/**
 * Customer Portal Styles - Modern Dashboard Design
 * Color Palette: #2C3E50, #3498DB, #E74C3C, #F8F9FA, #FFFFFF
 */

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: #2C3E50;
    background: linear-gradient(135deg, #F8F9FA 0%, #E9ECEF 100%);
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header Styles */
.header {
    background: linear-gradient(135deg, #2C3E50 0%, #34495E 100%);
    color: #FFFFFF;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 20px;
    font-weight: 700;
}

.logo i {
    font-size: 24px;
    color: #3498DB;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 20px;
}

.theme-toggle {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: #FFFFFF;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 16px;
}

.theme-toggle:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

.user-avatar i {
    font-size: 32px;
    color: #BDC3C7;
}

.user-details {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.user-name {
    font-weight: 600;
    font-size: 16px;
}

.user-role {
    font-size: 12px;
    color: #BDC3C7;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.logout-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #FFFFFF;
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
    font-size: 14px;
}

.logout-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-1px);
}

/* Main Content */
.main-content {
    min-height: calc(100vh - 70px);
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, #3498DB 0%, #2980B9 100%);
    color: #FFFFFF;
    padding: 60px 0;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grid" width="10" height="10" patternUnits="userSpaceOnUse"><path d="M 10 0 L 0 0 0 10" fill="none" stroke="rgba(255,255,255,0.1)" stroke-width="0.5"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
    opacity: 0.3;
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    margin-bottom: 50px;
}

.hero-title {
    font-size: 15px;
    font-weight: 600;
    margin: 0 0 2px 0;
    color: #ffffff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 18px;
    opacity: 0.9;
    max-width: 600px;
    display: block;
    color: #cbe849;
    font-size: 13px;
    font-weight: 400;
    margin: 0;
    line-height: 1.3;
    white-space: normal;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.hero-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    position: relative;
    z-index: 2;
}

.stat-card {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 16px;
    padding: 30px;
    text-align: center;
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.2);
}

.stat-icon i {
    font-size: 32px;
    margin-bottom: 16px;
    color: #FFFFFF;
}

.stat-number {
    display: block;
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 8px;
}

.stat-label {
    font-size: 14px;
    opacity: 0.9;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Dashboard Content */
.dashboard-content {
    padding: 60px 0;
    background: #F8F9FA;
}

.dashboard-grid {
    display: inline;
    grid-template-columns: 2fr 1fr;
    gap: 40px;
}

@media (max-width: 768px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
}

.dashboard-section {
    background: #FFFFFF;
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    margin-bottom: 32px;
}

.dashboard-section:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.12);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #F8F9FA;
}

.section-title {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 22px;
    font-weight: 700;
    color: #2C3E50;
}

.section-title i {
    color: #3498DB;
}

.section-action {
    color: #3498DB;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    transition: color 0.3s ease;
}

.section-action:hover {
    color: #2980B9;
}

/* Quick Actions */
.quick-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(140px, 1fr));
    gap: 16px;
    width: 100%;
}

@media (max-width: 900px) {
    .quick-actions {
        grid-template-columns: 1fr;
        gap: 10px;
    }
}

.action-card {
    position: relative;
    width: 100%;
    min-width: 0;
    height: 48px;
    background: #384A58 !important;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    text-decoration: none;
    color: #ffffff !important;
    transition: all 0.3s ease;
    border: none;
}

.action-card:hover {
    background: #2C3E50;
    transform: scale(1.05);
    box-shadow: 0 4px 16px rgba(56, 74, 88, 0.3);
}

.action-icon {
    display: none;
}

.action-content {
    flex: 1 1 auto;
    overflow: hidden;
    padding-left: 16px;
}

.action-title {
    font-size: 12px;
    font-weight: 500;
    margin: 0;
    color: #ffffff !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.action-description {
    display: none;
    /* Hide description in compact view */
}

.action-arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #cbe849;
    font-size: 20px;
    margin-left: 16px;
    height: 100%;
    min-width: 32px;
    transition: color 0.2s;
}

.action-card:hover .action-arrow {
    color: #3498DB;
}

/* Activity List */
.activity-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.activity-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    border-radius: 12px;
    background: #F8F9FA;
    transition: all 0.3s ease;
}

.activity-item:hover {
    background: #FFFFFF;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.activity-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
}

.activity-icon .fa-clock {
    background: #FFF3CD;
    color: #F39C12;
}

.activity-icon .fa-check-circle {
    background: #D4EDDA;
    color: #27AE60;
}

.activity-icon .fa-times-circle {
    background: #F8D7DA;
    color: #E74C3C;
}

.activity-content {
    flex: 1;
}

.activity-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 4px;
    color: #2C3E50;
}

.activity-meta {
    font-size: 13px;
    color: #7F8C8D;
    display: flex;
    gap: 12px;
    align-items: center;
}

.activity-status {
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-pending {
    background: #FFF3CD;
    color: #F39C12;
}

.status-approved {
    background: #D4EDDA;
    color: #27AE60;
}

.status-rejected {
    background: #F8D7DA;
    color: #E74C3C;
}

.activity-action {
    color: #BDC3C7;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: #7F8C8D;
}

.empty-icon i {
    font-size: 48px;
    margin-bottom: 16px;
    color: #BDC3C7;
}

.empty-state h3 {
    margin-bottom: 8px;
    color: #2C3E50;
}

/* Help Cards */
.help-cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

@media (max-width: 900px) {
    .help-cards {
        grid-template-columns: 1fr;
    }
}

.help-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px;
    background: #F8F9FA;
    border-radius: 12px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.help-card:hover {
    background: #FFFFFF;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
}

.help-icon {
    width: 45px;
    height: 45px;
    background: linear-gradient(135deg, #27AE60, #2ECC71);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #FFFFFF;
    font-size: 18px;
    flex-shrink: 0;
}

.help-content h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 4px;
    color: #2C3E50;
}

.help-content p {
    margin: 0;
    color: #7F8C8D;
    font-size: 14px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .header-content {
        padding: 0 15px;
        height: 60px;
    }

    .logo {
        font-size: 18px;
    }

    .logo i {
        font-size: 20px;
    }

    .user-details {
        display: none;
    }

    .hero-section {
        padding: 40px 0;
    }

    .hero-title {
        font-size: 28px;
    }

    .hero-subtitle {
        font-size: 16px;
    }

    .hero-stats {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .stat-card {
        padding: 20px;
    }

    .dashboard-content {
        padding: 40px 0;
    }

    .dashboard-section {
        padding: 20px;
    }

    .container {
        padding: 0 15px;
    }
}

.logout-btn {
    background: rgba(255, 255, 255, 0.2);
    color: #FFFFFF;
    padding: 6px 12px;
    border-radius: 4px;
    text-decoration: none;
    font-size: 14px;
    transition: background 0.3s;
}

.logout-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    color: #FFFFFF;
}

/* Dashboard Layout */
.dashboard {
    display: flex;
    min-height: calc(100vh - 60px);
}

.sidebar {
    width: 250px;
    background: #FFFFFF;
    border-right: 1px solid #ddd;
    padding: 20px 0;
}

.sidebar-nav {
    list-style: none;
}

.nav-item {
    margin-bottom: 5px;
}

.nav-link {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    color: #666;
    text-decoration: none;
    transition: all 0.3s;
}

.nav-link:hover,
.nav-link.active {
    background: #E7ECF2;
    color: #384A58;
}

.nav-link .icon {
    margin-right: 10px;
    width: 20px;
}

.main-content {
    flex: 1;
    padding: 30px;
    overflow-y: auto;
}

/* Cards */
.card {
    background: #FFFFFF;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

.card-header {
    padding: 20px;
    border-bottom: 1px solid #E7ECF2;
    font-weight: bold;
    color: #384A58;
}

.card-body {
    padding: 20px;
}

/* Forms */
.form {
    max-width: 100%;
}

.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: #384A58;
}

.form-control {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.3s;
}

.form-control:focus {
    outline: none;
    border-color: #384A58;
    box-shadow: 0 0 0 2px rgba(56, 74, 88, 0.1);
}

/* Date Input Styles - YY-MM-DD Format */
.form-control[type="date"] {
    position: relative;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23343a40' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 6s0-2 2-2h8s2 0 2 2v6s0 2-2 2H4s-2 0-2-2V6z'/%3e%3cpath fill='none' stroke='%23343a40' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m4 4l0-2'/%3e%3cpath fill='none' stroke='%23343a40' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m12 4l0-2'/%3e%3cpath fill='none' stroke='%23343a40' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 8h12'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px 16px;
    padding-right: 40px;
}

.form-control[type="date"]::-webkit-calendar-picker-indicator {
    background: transparent;
    bottom: 0;
    color: transparent;
    cursor: pointer;
    height: auto;
    left: 0;
    position: absolute;
    right: 0;
    top: 0;
    width: auto;
}

/* Date format hint */
.date-format-hint {
    font-size: 12px;
    color: #6c757d;
    margin-top: 4px;
    font-style: italic;
}

.date-format-hint::before {
    content: "📅 ";
    margin-right: 4px;
}

/* Date input with YY-MM-DD display preference */
.form-control[type="date"][data-yy-format="true"]::placeholder {
    color: #6c757d;
}

.form-control[type="date"][data-yy-format="true"]:focus::placeholder {
    opacity: 0.7;
}

.form-row {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.form-col {
    flex: 1;
}

.form-actions {
    display: flex;
    gap: 10px;
    margin-top: 30px;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 24px;
    background: #384A58;
    color: #FFFFFF;
    border: 1px solid #384A58;
    border-radius: 4px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
}

.btn:hover {
    background: #2c3e50;
    border-color: #2c3e50;
    color: #FFFFFF;
}

.btn-login {
    width: 100%;
    font-size: 16px;
    padding: 15px;
}

/* Tables */
.table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}

.table th,
.table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #E7ECF2;
}

.table th {
    background: #E7ECF2;
    font-weight: 600;
    color: #384A58;
}

.table tr:hover {
    background: #f8f9fa;
}

/* Action Grid */
.action-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.action-card {
    background: #FFFFFF;
    padding: 20px;
    border-radius: 8px;
    text-decoration: none;
    color: inherit;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: all 0.3s;
}

.action-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
    color: inherit;
}

.action-icon {
    font-size: 2em;
    margin-bottom: 10px;
}

.action-title {
    color: #384A58;
    margin-bottom: 10px;
    font-size: 1.2em;
}

.action-description {
    color: #666;
    font-size: 0.9em;
}

/* Login Page */
.login-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #384A58 0%, #2c3e50 100%);
    padding: 20px;
}

.login-card {
    background: #FFFFFF;
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    width: 100%;
    max-width: 400px;
}

.login-header {
    text-align: center;
    margin-bottom: 30px;
}

.login-header h1 {
    color: #384A58;
    margin-bottom: 10px;
}

.login-header p {
    color: #666;
    font-size: 14px;
}

.login-form .form-group {
    margin-bottom: 20px;
}

.login-footer {
    text-align: center;
    margin-top: 20px;
}

.login-footer a {
    color: #384A58;
    text-decoration: none;
    font-size: 14px;
}

.login-footer a:hover {
    color: #2c3e50;
}

/* Alert messages */
.alert {
    padding: 15px;
    margin-bottom: 20px;
    border: 1px solid transparent;
    border-radius: 4px;
}

.alert-success {
    color: #155724;
    background-color: #d4edda;
    border-color: #c3e6cb;
}

.alert-error {
    color: #721c24;
    background-color: #f8d7da;
    border-color: #f5c6cb;
}

/* Responsive Design */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }

    .sidebar.show {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0;
    }

    .form-row {
        flex-direction: column;
    }

    .action-grid {
        grid-template-columns: 1fr;
    }

    .header {
        padding: 0 15px;
    }
}

/* Dark Theme */
body.dark-theme {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    color: #E8E8E8;
}

.dark-theme .header {
    background: linear-gradient(135deg, #0f1419 0%, #1a1a2e 100%);
}

.dark-theme .hero-section {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
}

.dark-theme .dashboard-content {
    background: #1a1a2e;
}

.dark-theme .dashboard-section {
    background: #2c3e50;
    color: #E8E8E8;
}

.dark-theme .section-title {
    color: #E8E8E8;
}

.dark-theme .action-card {
    background: #34495e;
    color: #E8E8E8;
}

.dark-theme .action-card:hover {
    background: #3c5aa6;
    border-color: #5dade2;
}

.dark-theme .action-title {
    color: #E8E8E8;
}

.dark-theme .action-description {
    color: #BDC3C7;
}

.dark-theme .activity-item {
    background: #34495e;
    color: #E8E8E8;
}

.dark-theme .activity-item:hover {
    background: #3c5aa6;
}

.dark-theme .activity-title {
    color: #E8E8E8;
}

.dark-theme .help-card {
    background: #34495e;
    color: #E8E8E8;
}

.dark-theme .help-card:hover {
    background: #3c5aa6;
}

.dark-theme .help-content h3 {
    color: #E8E8E8;
}

.dark-theme .empty-state {
    color: #BDC3C7;
}

.dark-theme .empty-state h3 {
    color: #E8E8E8;
}