﻿/* Dashboard & Auth Styles */
.auth-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 85px 20px 50px;
    background: linear-gradient(135deg, rgba(220, 38, 38, 0.03) 0%, rgba(239, 68, 68, 0.05) 100%);
}

.auth-card {
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
    padding: 3rem;
    max-width: 600px;
    width: 100%;
}

.auth-header {
    text-align: center;
    margin-bottom: 2rem;
}

.auth-header h2 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.auth-header p {
    color: var(--text-light);
}

.auth-form .form-group {
    margin-bottom: 1.5rem;
}

.auth-form .form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.auth-form label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-dark);
}

.auth-form input[type="text"],
.auth-form input[type="email"],
.auth-form input[type="password"],
.auth-form input[type="tel"],
.auth-form textarea,
.auth-form select {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-family: inherit;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.auth-form input:focus,
.auth-form textarea:focus,
.auth-form select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
}

.auth-form .checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

.auth-form .checkbox-label input[type="checkbox"] {
    width: auto;
}

.auth-form .flex-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.auth-form .error {
    color: var(--primary-color);
    font-size: 0.875rem;
    margin-top: 0.25rem;
    display: block;
}

.auth-footer {
    text-align: center;
    margin-top: 1.5rem;
    color: var(--text-light);
}

.auth-footer a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
}

.forgot-link {
    color: var(--primary-color);
    text-decoration: none;
    font-size: 0.9rem;
}

/* Alerts */
.alert {
    padding: 1rem 1.5rem;
    border-radius: 8px;
    margin: 1rem 0;
    font-weight: 500;
}

.alert-success {
    background: #d1fae5;
    color: #065f46;
    border-left: 4px solid #10b981;
}

.alert-error {
    background: #fee2e2;
    color: #991b1b;
    border-left: 4px solid #dc2626;
}

.alert-info {
    background: #dbeafe;
    color: #1e40af;
    border-left: 4px solid #3b82f6;
}

/* Dashboard Styles */
.main-content {
    min-height: calc(100vh - 200px);
    padding-top: 150px;
    position: relative;
    z-index: 1;
}

.dashboard-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem 20px;
}

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.dashboard-title {
    font-size: 2rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary-color) 0%, #991b1b 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Modern Dashboard Cards Grid */
.dashboard-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.modern-card {
    position: relative;
    display: flex;
    align-items: center;
    gap: 1.25rem;
    background: white;
    padding: 1.75rem 1.5rem;
    border-radius: 20px;
    text-decoration: none;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 2px solid transparent;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

.modern-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(220, 38, 38, 0.02) 0%, rgba(239, 68, 68, 0.05) 100%);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.modern-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.12);
}

.modern-card:hover::before {
    opacity: 1;
}

.card-icon {
    flex-shrink: 0;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
    transition: all 0.4s ease;
    position: relative;
    z-index: 1;
}

.card-icon svg {
    width: 30px;
    height: 30px;
    transition: all 0.4s ease;
}

.card-content {
    flex: 1;
    position: relative;
    z-index: 1;
}

.card-content h4 {
    font-size: 0.9rem;
    font-weight: 600;
    color: #6b7280;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.card-value {
    font-size: 2rem;
    font-weight: 700;
    line-height: 1;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.card-description {
    font-size: 0.85rem;
    color: #9ca3af;
    margin: 0;
}

.card-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    height: 24px;
    padding: 0 0.5rem;
    background: #ef4444;
    color: white;
    font-size: 0.75rem;
    font-weight: 700;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.3);
}

.card-arrow {
    flex-shrink: 0;
    font-size: 1.5rem;
    font-weight: 700;
    opacity: 0;
    transform: translateX(-10px);
    transition: all 0.4s ease;
    position: relative;
    z-index: 1;
}

.modern-card:hover .card-arrow {
    opacity: 1;
    transform: translateX(0);
}

/* Card Color Variants */
.seo-card {
    border-color: rgba(16, 185, 129, 0.1);
}
.seo-card .card-icon {
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
}
.seo-card .card-icon svg { stroke: #10b981; }
.seo-card .card-value { color: #10b981; }
.seo-card:hover { border-color: #10b981; }
.seo-card:hover .card-icon { background: #10b981; transform: scale(1.1) rotate(5deg); }
.seo-card:hover .card-icon svg { stroke: white; }
.seo-card .card-arrow { color: #10b981; }

.users-card {
    border-color: rgba(59, 130, 246, 0.1);
}
.users-card .card-icon {
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
}
.users-card .card-icon svg { stroke: #3b82f6; }
.users-card .card-value { color: #3b82f6; }
.users-card:hover { border-color: #3b82f6; }
.users-card:hover .card-icon { background: #3b82f6; transform: scale(1.1) rotate(5deg); }
.users-card:hover .card-icon svg { stroke: white; }
.users-card .card-arrow { color: #3b82f6; }

.roles-card {
    border-color: rgba(139, 92, 246, 0.1);
}
.roles-card .card-icon {
    background: linear-gradient(135deg, #ede9fe 0%, #ddd6fe 100%);
}
.roles-card .card-icon svg { stroke: #8b5cf6; }
.roles-card .card-value { color: #8b5cf6; }
.roles-card:hover { border-color: #8b5cf6; }
.roles-card:hover .card-icon { background: #8b5cf6; transform: scale(1.1) rotate(5deg); }
.roles-card:hover .card-icon svg { stroke: white; }
.roles-card .card-arrow { color: #8b5cf6; }

.messages-card {
    border-color: rgba(220, 38, 38, 0.1);
}
.messages-card .card-icon {
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
}
.messages-card .card-icon svg { stroke: var(--primary-color); }
.messages-card .card-value { color: var(--primary-color); }
.messages-card:hover { border-color: var(--primary-color); }
.messages-card:hover .card-icon { background: var(--primary-color); transform: scale(1.1) rotate(5deg); }
.messages-card:hover .card-icon svg { stroke: white; }
.messages-card .card-arrow { color: var(--primary-color); }

.devices-card {
    border-color: rgba(245, 158, 11, 0.1);
}
.devices-card .card-icon {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
}
.devices-card .card-icon svg { stroke: #f59e0b; }
.devices-card .card-value { color: #f59e0b; }
.devices-card:hover { border-color: #f59e0b; }
.devices-card:hover .card-icon { background: #f59e0b; transform: scale(1.1) rotate(5deg); }
.devices-card:hover .card-icon svg { stroke: white; }
.devices-card .card-arrow { color: #f59e0b; }

.packages-card {
    border-color: rgba(236, 72, 153, 0.1);
}
.packages-card .card-icon {
    background: linear-gradient(135deg, #fce7f3 0%, #fbcfe8 100%);
}
.packages-card .card-icon svg { stroke: #ec4899; }
.packages-card .card-value { color: #ec4899; }
.packages-card:hover { border-color: #ec4899; }
.packages-card:hover .card-icon { background: #ec4899; transform: scale(1.1) rotate(5deg); }
.packages-card:hover .card-icon svg { stroke: white; }
.packages-card .card-arrow { color: #ec4899; }

.carousel-card {
    border-color: rgba(99, 102, 241, 0.1);
}
.carousel-card .card-icon {
    background: linear-gradient(135deg, #e0e7ff 0%, #c7d2fe 100%);
}
.carousel-card .card-icon svg { stroke: #6366f1; }
.carousel-card .card-value { color: #6366f1; }
.carousel-card:hover { border-color: #6366f1; }
.carousel-card:hover .card-icon { background: #6366f1; transform: scale(1.1) rotate(5deg); }
.carousel-card:hover .card-icon svg { stroke: white; }
.carousel-card .card-arrow { color: #6366f1; }

.features-card {
    border-color: rgba(14, 165, 233, 0.1);
}
.features-card .card-icon {
    background: linear-gradient(135deg, #e0f2fe 0%, #bae6fd 100%);
}
.features-card .card-icon svg { stroke: #0ea5e9; }
.features-card .card-value { color: #0ea5e9; }
.features-card:hover { border-color: #0ea5e9; }
.features-card:hover .card-icon { background: #0ea5e9; transform: scale(1.1) rotate(5deg); }
.features-card:hover .card-icon svg { stroke: white; }
.features-card .card-arrow { color: #0ea5e9; }

.products-card {
    border-color: rgba(168, 85, 247, 0.1);
}
.products-card .card-icon {
    background: linear-gradient(135deg, #f3e8ff 0%, #e9d5ff 100%);
}
.products-card .card-icon svg { stroke: #a855f7; }
.products-card .card-value { color: #a855f7; }
.products-card:hover { border-color: #a855f7; }
.products-card:hover .card-icon { background: #a855f7; transform: scale(1.1) rotate(5deg); }
.products-card:hover .card-icon svg { stroke: white; }
.products-card .card-arrow { color: #a855f7; }

.applications-card {
    border-color: rgba(20, 184, 166, 0.1);
}
.applications-card .card-icon {
    background: linear-gradient(135deg, #ccfbf1 0%, #99f6e4 100%);
}
.applications-card .card-icon svg { stroke: #14b8a6; }
.applications-card .card-value { color: #14b8a6; }
.applications-card:hover { border-color: #14b8a6; }
.applications-card:hover .card-icon { background: #14b8a6; transform: scale(1.1) rotate(5deg); }
.applications-card:hover .card-icon svg { stroke: white; }
.applications-card .card-arrow { color: #14b8a6; }

/* Email Settings Card */
.email-settings-card {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
}
.email-settings-card .card-icon {
    background: rgba(245, 158, 11, 0.1);
}
.email-settings-card .card-icon svg { stroke: #f59e0b; }
.email-settings-card .card-value { color: #f59e0b; }
.email-settings-card:hover { border-color: #f59e0b; }
.email-settings-card:hover .card-icon { background: #f59e0b; transform: scale(1.1) rotate(5deg); }
.email-settings-card:hover .card-icon svg { stroke: white; }
.email-settings-card .card-arrow { color: #f59e0b; }

/* Responsive Cards */
@media (max-width: 968px) {
    .dashboard-stats-grid {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
        gap: 1.25rem;
    }
    
    .modern-card {
        padding: 1.5rem 1.25rem;
    }
    
    .card-icon {
        width: 50px;
        height: 50px;
    }
    
    .card-icon svg {
        width: 24px;
        height: 24px;
    }
    
    .card-value {
        font-size: 1.75rem;
    }
    
    .quick-nav-actions {
        gap: 0.35rem;
    }
    
    .quick-nav-btn {
        width: 36px;
        height: 36px;
    }
    
    .quick-nav-btn svg {
        width: 18px;
        height: 18px;
    }
}

@media (max-width: 640px) {
    .dashboard-stats-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .quick-nav-actions {
        padding-right: 0.75rem;
    }
    
    .user-name {
        display: none;
    }
}

.dashboard-section {
    background: white;
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    border: 1px solid rgba(220, 38, 38, 0.06);
    margin-bottom: 2rem;
    transition: all 0.3s ease;
}

.dashboard-section:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.quick-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid rgba(220, 38, 38, 0.08);
}

.section-header h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-dark);
    margin: 0;
}

/* Tables */
.table-container {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

table thead {
    background: var(--bg-red-light);
}

table th {
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    color: var(--text-dark);
    border-bottom: 2px solid var(--border-color);
    vertical-align: middle;
}

table td {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
    vertical-align: middle;
}

table tbody tr:hover {
    background: var(--bg-red-light);
}

/* Badge Styles */
.badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.35rem 0.85rem;
    border-radius: 12px;
    font-size: 0.8125rem;
    font-weight: 600;
    white-space: nowrap;
    vertical-align: middle;
    line-height: 1.2;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.35rem 0.85rem;
    border-radius: 12px;
    font-size: 0.8125rem;
    font-weight: 600;
    white-space: nowrap;
    vertical-align: middle;
    line-height: 1.2;
}

/* Table Action Buttons */
table td .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
    vertical-align: middle;
}

table td > div {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.status-pending {
    background: #fef3c7;
    color: #92400e;
}

.status-active {
    background: #d1fae5;
    color: #065f46;
}

.status-approved {
    background: #d1fae5;
    color: #065f46;
}

.status-rejected {
    background: #fee2e2;
    color: #991b1b;
}

.status-suspended {
    background: #e5e7eb;
    color: #374151;
}

/* Dropdown Menu */
.dropdown {
    position: relative;
    z-index: 10000;
}

.dropdown-toggle {
    background: rgba(220, 38, 38, 0.1);
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.dropdown-toggle:hover {
    background: var(--primary-color);
}

.dropdown-toggle:hover svg {
    color: white;
}

.dropdown-toggle svg {
    width: 20px;
    height: 20px;
    color: var(--primary-color);
    transition: color 0.3s ease;
}

.dropdown-menu {
    position: fixed;
    top: 70px;
    right: 1.5rem;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    min-width: 200px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 10001;
    border: 1px solid rgba(220, 38, 38, 0.1);
}

.dropdown:hover .dropdown-menu,
.dropdown.active .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-menu a,
.dropdown-menu button {
    display: block;
    width: 100%;
    padding: 0.75rem 1rem;
    text-align: left;
    text-decoration: none;
    color: var(--text-dark);
    border: none;
    background: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.dropdown-menu a:hover,
.dropdown-menu button:hover {
    background: var(--bg-red-light);
    color: var(--primary-color);
}

.dropdown-menu hr {
    margin: 0.5rem 0;
    border: none;
    border-top: 1px solid var(--border-color);
}

.nav-menu-auth {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    position: relative;
    z-index: 10002;
}

.quick-nav-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding-right: 1rem;
    border-right: 2px solid rgba(220, 38, 38, 0.1);
}

.quick-nav-btn {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(220, 38, 38, 0.05);
    border-radius: 10px;
    transition: all 0.3s ease;
    color: var(--primary-color);
    text-decoration: none;
}

.quick-nav-btn:hover {
    background: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.25);
}

.quick-nav-btn svg {
    width: 20px;
    height: 20px;
    stroke: var(--primary-color);
    transition: stroke 0.3s ease;
}

.quick-nav-btn:hover svg {
    stroke: white;
}

.nav-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #ef4444;
    color: white;
    font-size: 0.65rem;
    font-weight: 700;
    padding: 0.15rem 0.4rem;
    border-radius: 10px;
    min-width: 18px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.4);
}

.user-name {
    font-weight: 600;
    color: var(--text-dark);
}

/* Button Styles */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.625rem 1.25rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9375rem;
    text-decoration: none;
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    line-height: 1.5;
    gap: 0.5rem;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, #b91c1c 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.2);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #b91c1c 0%, #991b1b 100%);
    box-shadow: 0 6px 16px rgba(220, 38, 38, 0.3);
    transform: translateY(-1px);
}

.btn-outline {
    background: white;
    color: var(--text-dark);
    border: 2px solid #e5e7eb;
}

.btn-outline:hover {
    background: var(--bg-red-light);
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.btn-sm {
    padding: 0.4rem 0.875rem;
    font-size: 0.875rem;
    border-radius: 6px;
}

/* Mobile Responsive */
@media (max-width: 640px) {
    .auth-card {
        padding: 2rem;
    }

    .auth-form .form-row {
        grid-template-columns: 1fr;
    }

    .dashboard-stats {
        grid-template-columns: 1fr;
    }

    .dashboard-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .user-name {
        display: none;
    }
}
/* Action Buttons - Inline Horizontal */
.action-buttons {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    flex-wrap: nowrap;
}

.action-buttons form {
    margin: 0 !important;
    display: inline-block;
}

.action-buttons .btn {
    white-space: nowrap;
}
