/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
}

:root {
    --primary-color: #2196F3;
    --secondary-color: #4CAF50;
    --accent-color: #FF9800;
    --danger-color: #F44336;
    --warning-color: #FFC107;
    --dark-color: #333;
    --light-color: #f8f9fa;
    --gray-color: #6c757d;
    --sidebar-color: #2c3e50;
    --card-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

body {
    background-color: #f5f7fa;
    color: var(--dark-color);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Login Screen */
.login-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.login-box {
    background: white;
    border-radius: 15px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
    width: 90%;
    max-width: 450px;
    padding: 40px;
    text-align: center;
    animation: slideUp 0.5s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.login-header h1 {
    color: var(--primary-color);
    margin-bottom: 10px;
    font-size: 28px;
}

.login-header p {
    color: var(--gray-color);
    margin-bottom: 30px;
}

.login-body input {
    width: 100%;
    padding: 15px;
    margin-bottom: 20px;
    border: 2px solid #e1e5eb;
    border-radius: 8px;
    font-size: 16px;
    transition: var(--transition);
}

.login-body input:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 0 3px rgba(33, 150, 243, 0.2);
}

#loginBtn {
    width: 100%;
    padding: 15px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

#loginBtn:hover {
    background: #0d8bf2;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(33, 150, 243, 0.3);
}

.error-message {
    color: var(--danger-color);
    margin-top: 15px;
    font-size: 14px;
    min-height: 20px;
}

.hint {
    margin-top: 25px;
    padding: 10px;
    background-color: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid var(--accent-color);
}

.hint p {
    color: var(--gray-color);
    font-size: 14px;
}

.login-footer {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #eee;
    color: var(--gray-color);
    font-size: 14px;
}

/* Dashboard Container */
.dashboard-container {
    display: none;
}

/* Dashboard Header */
.dashboard-header {
    background: white;
    padding: 20px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--card-shadow);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-left h1 {
    color: var(--dark-color);
    font-size: 24px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.subtitle {
    color: var(--gray-color);
    font-size: 14px;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

.header-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
}

.calc-header-btn {
    background: #FF9800;
    color: white;
}

.calc-header-btn:hover {
    background: #f57c00;
}

.download-header-btn {
    background: #4CAF50;
    color: white;
}

.download-header-btn:hover {
    background: #388E3C;
}

.logout-btn {
    background: var(--danger-color);
    color: white;
}

.logout-btn:hover {
    background: #d32f2f;
}

.current-date {
    background: #f8f9fa;
    padding: 8px 15px;
    border-radius: 6px;
    font-size: 14px;
    color: var(--gray-color);
}

/* Calculator Panel */
.calculator-panel {
    position: fixed;
    top: 80px;
    right: 20px;
    width: 320px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    display: none;
    overflow: hidden;
    border: 1px solid #e1e5eb;
}

.calculator-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.calculator-header h3 {
    margin: 0;
    font-size: 18px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.close-calc-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.close-calc-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

.calculator-display {
    padding: 20px;
    background: #f8f9fa;
    border-bottom: 1px solid #e1e5eb;
}

.calculator-display input {
    width: 100%;
    padding: 15px;
    font-size: 24px;
    text-align: right;
    border: 2px solid #e1e5eb;
    border-radius: 8px;
    background: white;
    font-family: 'Courier New', monospace;
    font-weight: bold;
    color: var(--dark-color);
}

.calculator-buttons {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    padding: 20px;
    background: #f8f9fa;
}

.calc-btn {
    padding: 15px;
    font-size: 18px;
    font-weight: 600;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition);
    background: white;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    color: var(--dark-color);
}

.calc-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.calc-btn.operator {
    background: #4CAF50;
    color: white;
}

.calc-btn.equals {
    background: #2196F3;
    color: white;
    grid-column: span 2;
}

.calc-btn[data-value="C"],
.calc-btn[data-value="CE"] {
    background: #F44336;
    color: white;
}

.calculator-footer {
    padding: 10px 20px;
    background: #f8f9fa;
    border-top: 1px solid #e1e5eb;
    font-size: 12px;
    color: var(--gray-color);
    text-align: center;
}

/* Dashboard Content Layout */
.dashboard-content {
    display: flex;
    min-height: calc(100vh - 120px);
}

/* Sidebar Navigation */
.sidebar {
    width: 250px;
    background: var(--sidebar-color);
    color: white;
    padding: 25px 0;
    flex-shrink: 0;
}

.sidebar ul {
    list-style: none;
}

.sidebar li {
    padding: 15px 25px;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 12px;
    border-left: 4px solid transparent;
}

.sidebar li:hover {
    background: rgba(255, 255, 255, 0.1);
}

.sidebar li.active {
    background: rgba(255, 255, 255, 0.15);
    border-left-color: var(--primary-color);
    font-weight: 500;
}

.sidebar-footer {
    margin-top: 40px;
    padding: 20px 25px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-footer h3 {
    font-size: 16px;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.sidebar-footer p {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.7);
}

/* Main Content */
.main-content {
    flex: 1;
    padding: 30px;
    overflow-y: auto;
    max-height: calc(100vh - 120px);
}

.content-section {
    display: none;
}

.content-section.active {
    display: block;
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.section-header {
    margin-bottom: 30px;
}

.section-header h2 {
    color: var(--dark-color);
    font-size: 28px;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.section-header p {
    color: var(--gray-color);
}

/* Cards Container */
.cards-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
}

.card {
    background: white;
    border-radius: 12px;
    padding: 25px;
    box-shadow: var(--card-shadow);
    transition: var(--transition);
    border-top: 4px solid var(--primary-color);
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.card-icon {
    width: 60px;
    height: 60px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    color: white;
    font-size: 24px;
}

.card h3 {
    color: var(--gray-color);
    font-size: 16px;
    font-weight: 500;
    margin-bottom: 10px;
}

.card-value {
    font-size: 32px;
    font-weight: 700;
    color: var(--dark-color);
    margin-bottom: 10px;
}

.card-change {
    font-size: 14px;
    font-weight: 500;
}

.positive {
    color: var(--secondary-color);
}

.negative {
    color: var(--danger-color);
}

/* Quick Summary */
.quick-summary {
    background: white;
    border-radius: 12px;
    padding: 25px;
    box-shadow: var(--card-shadow);
    margin-bottom: 30px;
}

.quick-summary h3 {
    margin-bottom: 20px;
    color: var(--dark-color);
    display: flex;
    align-items: center;
    gap: 10px;
}

.summary-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.summary-item {
    display: flex;
    justify-content: space-between;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
}

.summary-item span:first-child {
    color: var(--gray-color);
}

.summary-item span:last-child {
    font-weight: 600;
    color: var(--dark-color);
}

/* Dashboard Actions */
.dashboard-actions {
    background: white;
    border-radius: 12px;
    padding: 25px;
    box-shadow: var(--card-shadow);
}

.dashboard-actions h3 {
    margin-bottom: 20px;
    color: var(--dark-color);
    display: flex;
    align-items: center;
    gap: 10px;
}

.action-buttons-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.action-btn {
    padding: 15px;
    background: #f8f9fa;
    border: 2px solid #e1e5eb;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    text-align: center;
    color: var(--dark-color);
}

.action-btn:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    transform: translateY(-2px);
}

/* Budget Section */
.budget-container {
    display: flex;
    flex-direction: column;
    gap: 40px;
}

.budget-charts {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 30px;
    margin-bottom: 20px;
}

.chart-container {
    background: white;
    border-radius: 12px;
    padding: 25px;
    box-shadow: var(--card-shadow);
}

.chart-container h3 {
    margin-bottom: 20px;
    color: var(--dark-color);
}

.budget-tables {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 30px;
}

.table-container {
    background: white;
    border-radius: 12px;
    padding: 25px;
    box-shadow: var(--card-shadow);
}

.table-container h3 {
    margin-bottom: 20px;
    color: var(--dark-color);
}

.budget-table {
    width: 100%;
    border-collapse: collapse;
}

.budget-table th {
    background: #f8f9fa;
    padding: 15px;
    text-align: left;
    color: var(--gray-color);
    font-weight: 600;
    border-bottom: 2px solid #e1e5eb;
}

.budget-table td {
    padding: 15px;
    border-bottom: 1px solid #e1e5eb;
}

.budget-table tfoot td {
    font-weight: 600;
    border-top: 2px solid #e1e5eb;
    border-bottom: none;
}

.change-row td {
    background: #f0f9ff;
    color: var(--primary-color);
}

/* Career Section */
.career-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
}

.career-card {
    background: white;
    border-radius: 12px;
    padding: 25px;
    box-shadow: var(--card-shadow);
    transition: var(--transition);
    text-align: center;
    border-top: 4px solid var(--primary-color);
}

.career-card:hover {
    transform: translateY(-5px);
}

.career-icon {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, var(--primary-color), #64b5f6);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    color: white;
    font-size: 30px;
}

.career-card h3 {
    color: var(--dark-color);
    margin-bottom: 15px;
    font-size: 18px;
}

.career-card p {
    color: var(--gray-color);
    margin-bottom: 20px;
    font-size: 14px;
}

.skills {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
}

.skill-tag {
    background: #e3f2fd;
    color: var(--primary-color);
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

/* Career Timeline */
.career-timeline {
    background: white;
    border-radius: 12px;
    padding: 25px;
    box-shadow: var(--card-shadow);
}

.career-timeline h3 {
    margin-bottom: 25px;
    color: var(--dark-color);
    display: flex;
    align-items: center;
    gap: 10px;
}

.timeline {
    position: relative;
    padding-left: 30px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: var(--primary-color);
    border-radius: 2px;
}

.timeline-item {
    position: relative;
    margin-bottom: 30px;
    padding-left: 30px;
}

.timeline-item:last-child {
    margin-bottom: 0;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -38px;
    top: 5px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--primary-color);
    border: 4px solid white;
    box-shadow: 0 0 0 3px var(--primary-color);
}

.timeline-date {
    position: absolute;
    left: -150px;
    top: 0;
    background: var(--primary-color);
    color: white;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
}

.timeline-content h4 {
    color: var(--dark-color);
    margin-bottom: 8px;
    font-size: 18px;
}

.timeline-content p {
    color: var(--gray-color);
    font-size: 14px;
}

/* Goals Section */
#goalsContainer {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 25px;
    margin-bottom: 30px;
}

.goal-card {
    background: white;
    border-radius: 12px;
    padding: 25px;
    box-shadow: var(--card-shadow);
    transition: var(--transition);
    border-top: 4px solid var(--danger-color);
}

.goal-card:hover {
    transform: translateY(-3px);
}

.goal-card.priority-high {
    border-top-color: var(--danger-color);
}

.goal-card.priority-medium {
    border-top-color: var(--warning-color);
}

.goal-card.priority-low {
    border-top-color: var(--secondary-color);
}

.goal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.goal-header h3 {
    color: var(--dark-color);
    font-size: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.goal-price {
    background: #f8f9fa;
    padding: 8px 15px;
    border-radius: 20px;
    font-weight: 600;
    color: var(--dark-color);
}

.goal-card p {
    color: var(--gray-color);
    margin-bottom: 20px;
    line-height: 1.6;
}

.goal-progress {
    margin-bottom: 20px;
}

.progress-bar {
    height: 10px;
    background: #e9ecef;
    border-radius: 5px;
    overflow: hidden;
    margin-bottom: 8px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(to right, var(--secondary-color), #81c784);
    border-radius: 5px;
    transition: width 1s ease;
}

.progress-text {
    font-size: 14px;
    color: var(--gray-color);
}

.goal-details {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    padding-top: 15px;
    border-top: 1px solid #e9ecef;
}

.detail {
    display: flex;
    flex-direction: column;
}

.detail-label {
    font-size: 12px;
    color: var(--gray-color);
    margin-bottom: 5px;
}

.detail-value {
    font-weight: 600;
    color: var(--dark-color);
}

.high-priority {
    color: var(--danger-color);
}

.medium-priority {
    color: var(--warning-color);
}

.low-priority {
    color: var(--secondary-color);
}

/* Add Goal Form */
.add-goal-form {
    background: white;
    border-radius: 12px;
    padding: 25px;
    box-shadow: var(--card-shadow);
    margin-bottom: 30px;
}

.add-goal-form h3 {
    margin-bottom: 20px;
    color: var(--dark-color);
    display: flex;
    align-items: center;
    gap: 10px;
}

.goal-form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

/* Financial Summary */
.financial-summary {
    background: white;
    border-radius: 12px;
    padding: 25px;
    box-shadow: var(--card-shadow);
}

.financial-summary h3 {
    margin-bottom: 20px;
    color: var(--dark-color);
    display: flex;
    align-items: center;
    gap: 10px;
}

.summary-table {
    overflow-x: auto;
}

.summary-table table {
    width: 100%;
    border-collapse: collapse;
}

.summary-table th {
    background: #f8f9fa;
    padding: 15px;
    text-align: left;
    color: var(--gray-color);
    font-weight: 600;
    border-bottom: 2px solid #e1e5eb;
}

.summary-table td {
    padding: 15px;
    border-bottom: 1px solid #e1e5eb;
}

.summary-table .total-row td {
    background: #f0f9ff;
    font-weight: 700;
    color: var(--dark-color);
    border-top: 2px solid #e1e5eb;
}

/* Grocery List Section */
.grocery-container {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 30px;
    margin-bottom: 30px;
}

@media (max-width: 1024px) {
    .grocery-container {
        grid-template-columns: 1fr;
    }
}

.grocery-input-section {
    background: white;
    border-radius: 12px;
    padding: 25px;
    box-shadow: var(--card-shadow);
}

.grocery-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.grocery-list-section {
    background: white;
    border-radius: 12px;
    padding: 25px;
    box-shadow: var(--card-shadow);
}

.grocery-list-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f0f0f0;
}

.grocery-stats {
    display: flex;
    gap: 20px;
    font-weight: 600;
    color: var(--primary-color);
}

.grocery-list-categories {
    margin-bottom: 25px;
    max-height: 400px;
    overflow-y: auto;
    padding-right: 10px;
}

.grocery-category {
    margin-bottom: 20px;
}

.grocery-category h4 {
    background: #f8f9fa;
    padding: 10px 15px;
    border-radius: 6px;
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--dark-color);
}

.category-item-count {
    background: var(--primary-color);
    color: white;
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 12px;
}

.grocery-items {
    padding-left: 15px;
}

.grocery-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    border-bottom: 1px solid #f0f0f0;
    transition: var(--transition);
}

.grocery-item:hover {
    background: #f8f9fa;
}

.grocery-item.bought {
    opacity: 0.6;
    text-decoration: line-through;
}

.grocery-item-info {
    display: flex;
    align-items: center;
    gap: 15px;
    flex: 1;
}

.grocery-item-checkbox {
    width: 20px;
    height: 20px;
    cursor: pointer;
}

.grocery-item-details {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.grocery-item-name {
    font-weight: 500;
    color: var(--dark-color);
}

.grocery-item-quantity {
    font-size: 14px;
    color: var(--gray-color);
}

.grocery-item-price {
    font-weight: 600;
    color: var(--secondary-color);
    min-width: 80px;
    text-align: right;
}

.grocery-item-actions {
    display: flex;
    gap: 10px;
}

.grocery-action-btn {
    background: none;
    border: none;
    color: var(--gray-color);
    cursor: pointer;
    font-size: 16px;
    transition: var(--transition);
}

.grocery-action-btn:hover {
    color: var(--primary-color);
}

.grocery-action-btn.delete:hover {
    color: var(--danger-color);
}

.grocery-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding-top: 20px;
    border-top: 1px solid #e9ecef;
}

/* Grocery Dashboard */
.grocery-dashboard {
    background: white;
    border-radius: 12px;
    padding: 25px;
    box-shadow: var(--card-shadow);
}

.grocery-dashboard h3 {
    margin-bottom: 20px;
    color: var(--dark-color);
    display: flex;
    align-items: center;
    gap: 10px;
}

.grocery-dashboard-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.grocery-card {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 20px;
    text-align: center;
    border-top: 4px solid var(--primary-color);
}

.grocery-card-icon {
    width: 50px;
    height: 50px;
    background: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 15px;
    color: white;
    font-size: 20px;
}

.grocery-card h4 {
    color: var(--gray-color);
    font-size: 14px;
    margin-bottom: 10px;
    font-weight: 500;
}

.grocery-card-value {
    font-size: 24px;
    font-weight: 700;
    color: var(--dark-color);
}

/* Edit Section */
.edit-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
}

.edit-form {
    background: white;
    border-radius: 12px;
    padding: 25px;
    box-shadow: var(--card-shadow);
}

.edit-form h3 {
    margin-bottom: 20px;
    color: var(--dark-color);
    display: flex;
    align-items: center;
    gap: 10px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--gray-color);
    font-weight: 500;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #e1e5eb;
    border-radius: 8px;
    font-size: 16px;
    transition: var(--transition);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 0 3px rgba(33, 150, 243, 0.2);
}

.form-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 25px;
}

.btn-primary,
.btn-secondary,
.btn-danger,
.btn-warning {
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background: #0d8bf2;
    transform: translateY(-2px);
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #5a6268;
    transform: translateY(-2px);
}

.btn-danger {
    background: var(--danger-color);
    color: white;
}

.btn-danger:hover {
    background: #d32f2f;
    transform: translateY(-2px);
}

.btn-warning {
    background: var(--warning-color);
    color: #212529;
}

.btn-warning:hover {
    background: #e0a800;
    transform: translateY(-2px);
}

.data-management {
    background: white;
    border-radius: 12px;
    padding: 25px;
    box-shadow: var(--card-shadow);
    grid-column: 1 / -1;
}

.data-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin: 20px 0;
}

.data-info {
    padding-top: 20px;
    border-top: 1px solid #e9ecef;
    color: var(--gray-color);
    font-size: 14px;
}

.data-info i {
    color: var(--primary-color);
    margin-right: 8px;
}

/* Action Buttons in Tables */
.action-buttons {
    display: flex;
    gap: 8px;
}

.action-btn-table {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 14px;
    padding: 5px;
    color: var(--gray-color);
    transition: var(--transition);
}

.action-btn-table:hover {
    color: var(--primary-color);
}

.action-btn-table.edit:hover {
    color: var(--warning-color);
}

.action-btn-table.delete:hover {
    color: var(--danger-color);
}

/* Dashboard Footer */
.dashboard-footer {
    background: white;
    padding: 20px 30px;
    text-align: center;
    color: var(--gray-color);
    font-size: 14px;
    border-top: 1px solid #e1e5eb;
}

.dashboard-footer p:first-child {
    margin-bottom: 8px;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .dashboard-content {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
        padding: 15px 0;
    }
    
    .sidebar ul {
        display: flex;
        overflow-x: auto;
        padding: 0 15px;
    }
    
    .sidebar li {
        white-space: nowrap;
        padding: 10px 20px;
        border-left: none;
        border-bottom: 3px solid transparent;
    }
    
    .sidebar li.active {
        border-left: none;
        border-bottom-color: var(--primary-color);
    }
    
    .sidebar-footer {
        display: none;
    }
    
    .main-content {
        padding: 20px;
    }
    
    .calculator-panel {
        position: fixed;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        width: 90%;
        max-width: 320px;
        right: auto;
    }
}

@media (max-width: 768px) {
    .cards-container,
    .budget-charts,
    .budget-tables,
    .career-cards,
    #goalsContainer,
    .edit-container,
    .grocery-dashboard-cards {
        grid-template-columns: 1fr;
    }
    
    .dashboard-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .header-right {
        width: 100%;
        justify-content: space-between;
        flex-wrap: wrap;
    }
    
    .timeline-date {
        position: static;
        display: inline-block;
        margin-bottom: 10px;
    }
    
    .timeline::before {
        left: 15px;
    }
    
    .timeline-item {
        padding-left: 45px;
    }
    
    .timeline-item::before {
        left: 7px;
    }
    
    .goal-form-row {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .login-box {
        padding: 30px 20px;
    }
    
    .section-header h2 {
        font-size: 24px;
    }
    
    .card-value {
        font-size: 28px;
    }
    
    .form-buttons,
    .data-buttons,
    .grocery-actions {
        flex-direction: column;
    }
    
    .btn-primary,
    .btn-secondary,
    .btn-danger,
    .btn-warning {
        width: 100%;
        justify-content: center;
    }
    
    .action-buttons-container {
        grid-template-columns: 1fr;
    }
    
    .header-btn {
        padding: 8px 12px;
        font-size: 12px;
    }
    
    .grocery-stats {
        flex-direction: column;
        gap: 5px;
    }
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* Animation for new items */
@keyframes highlight {
    0% {
        background-color: #e3f2fd;
    }
    100% {
        background-color: transparent;
    }
}

.highlight {
    animation: highlight 2s ease;
}