/* Dashboard Styles */

/* Fluid Nav for Dashboard */
.nav.fluid {
    padding: 0 24px;
}

.nav.fluid .container {
    max-width: none;
    padding: 0;
}

.nav.fluid .nav-content {
    max-width: none;
}

/* Open App Button */
.btn-open-app {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    border-radius: 10px;
    background: linear-gradient(135deg, #8b5cf6, #ec4899, #f97316);
    background-size: 200% 200%;
    animation: gradientShift 3s ease infinite;
    color: white;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.3);
}

.btn-open-app:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(139, 92, 246, 0.4);
}

.btn-open-app i {
    font-size: 14px;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Layout */
.dashboard-layout {
    display: flex;
    min-height: 100vh;
    padding-top: 65px;
}

/* Sidebar */
.sidebar {
    width: 260px;
    background: var(--bg-secondary);
    border-right: 1px solid var(--border);
    padding: 24px 0;
    position: fixed;
    top: 65px;
    left: 0;
    bottom: 0;
    overflow-y: auto;
}

.sidebar-section {
    padding: 0 16px;
    margin-bottom: 24px;
}

.sidebar-label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    padding: 0 12px;
    margin-bottom: 8px;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 8px;
    color: var(--text-light);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
}

.sidebar-link i {
    width: 20px;
    font-size: 16px;
    opacity: 0.7;
}

.sidebar-link:hover {
    background: var(--bg-tertiary);
    color: var(--text);
}

.sidebar-link.active {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.15), rgba(249, 115, 22, 0.1));
    color: var(--text);
}

.sidebar-link.active i {
    opacity: 1;
    color: var(--primary-light);
}

.sidebar-divider {
    height: 1px;
    background: var(--border);
    margin: 16px;
}

/* User Card in Sidebar */
.sidebar-user {
    padding: 16px;
    margin: 0 16px 16px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: 12px;
}

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

.sidebar-avatar {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 16px;
}

.sidebar-user-details h4 {
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 2px;
}

.sidebar-user-details p {
    font-size: 12px;
    color: var(--text-muted);
}

.sidebar-plan-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    margin-top: 12px;
}

.sidebar-plan-badge.free {
    background: var(--bg-secondary);
    color: var(--text-muted);
    border: 1px solid var(--border);
}

.sidebar-plan-badge.pro {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: white;
}

.sidebar-plan-badge.team {
    background: linear-gradient(135deg, var(--accent), var(--teal));
    color: white;
}

/* Main Content */
.dashboard-main {
    flex: 1;
    margin-left: 260px;
    padding: 24px 32px;
    background: var(--bg);
    min-height: calc(100vh - 65px);
}

.dashboard-header {
    margin-bottom: 24px;
}

.dashboard-header h1 {
    font-size: 28px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 8px;
}

.dashboard-header p {
    color: var(--text-muted);
    font-size: 15px;
}

/* Cards */
.dashboard-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    margin-bottom: 32px;
}

.dash-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 24px;
    transition: all 0.2s;
}

.dash-card:hover {
    border-color: var(--border-light);
}

.dash-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.dash-card-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.dash-card-icon.blue {
    background: rgba(59, 130, 246, 0.15);
    color: var(--primary-light);
}

.dash-card-icon.orange {
    background: rgba(249, 115, 22, 0.15);
    color: var(--accent-light);
}

.dash-card-icon.teal {
    background: rgba(20, 184, 166, 0.15);
    color: var(--teal);
}

.dash-card-icon.purple {
    background: rgba(139, 92, 246, 0.15);
    color: #a78bfa;
}

.dash-card-badge {
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
}

.dash-card-badge.active {
    background: rgba(34, 197, 94, 0.15);
    color: #22c55e;
}

.dash-card-badge.warning {
    background: rgba(234, 179, 8, 0.15);
    color: #eab308;
}

.dash-card-badge.danger {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
}

.dash-card h3 {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.dash-card-value {
    font-size: 28px;
    font-weight: 700;
    color: var(--text);
}

.dash-card-value span {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-muted);
}

.dash-card-footer {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
}

.dash-card-link {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--primary-light);
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    transition: gap 0.2s;
}

.dash-card-link:hover {
    gap: 10px;
}

/* Sections */
.dashboard-section {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 16px;
    margin-bottom: 24px;
    overflow: hidden;
}

.dashboard-section .section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border);
    text-align: left;
    margin-bottom: 0;
}

.dashboard-section .section-header h2 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
}

.dashboard-section .section-header h2 i {
    color: var(--text-muted);
}

.section-content {
    padding: 24px;
}

/* Tables */
.dash-table {
    width: 100%;
    border-collapse: collapse;
}

.dash-table th {
    text-align: left;
    padding: 12px 16px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border);
}

.dash-table td {
    padding: 16px;
    font-size: 14px;
    color: var(--text-light);
    border-bottom: 1px solid var(--border);
}

.dash-table tr:last-child td {
    border-bottom: none;
}

.dash-table tr:hover td {
    background: var(--bg-tertiary);
}

/* Status Badges */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

.status-badge.paid {
    background: rgba(34, 197, 94, 0.15);
    color: #22c55e;
}

.status-badge.pending {
    background: rgba(234, 179, 8, 0.15);
    color: #eab308;
}

.status-badge.failed {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
}

.status-badge i {
    font-size: 10px;
}

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

.form-label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: var(--text);
    margin-bottom: 8px;
}

.form-input {
    width: 100%;
    padding: 12px 16px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: var(--bg-tertiary);
    color: var(--text);
    font-size: 14px;
    transition: all 0.2s;
}

.form-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-input::placeholder {
    color: var(--text-muted);
}

.form-hint {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 6px;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

/* Toggle Switch */
.toggle-group {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 0;
    border-bottom: 1px solid var(--border);
}

.toggle-group:last-child {
    border-bottom: none;
}

.toggle-info h4 {
    font-size: 14px;
    font-weight: 500;
    color: var(--text);
    margin-bottom: 4px;
}

.toggle-info p {
    font-size: 13px;
    color: var(--text-muted);
}

.toggle-switch {
    position: relative;
    width: 44px;
    height: 24px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: 24px;
    transition: all 0.2s;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 2px;
    bottom: 2px;
    background: var(--text-muted);
    border-radius: 50%;
    transition: all 0.2s;
}

.toggle-switch input:checked + .toggle-slider {
    background: var(--primary);
    border-color: var(--primary);
}

.toggle-switch input:checked + .toggle-slider:before {
    background: white;
    transform: translateX(20px);
}

/* Team Members */
.team-member {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    border-bottom: 1px solid var(--border);
}

.team-member:last-child {
    border-bottom: none;
}

.team-member-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.team-avatar {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 14px;
    font-weight: 600;
}

.team-avatar.pending {
    background: var(--bg-tertiary);
    color: var(--text-muted);
    border: 1px dashed var(--border);
}

.team-member-details h4 {
    font-size: 14px;
    font-weight: 500;
    color: var(--text);
    margin-bottom: 2px;
}

.team-member-details p {
    font-size: 13px;
    color: var(--text-muted);
}

.team-member-role {
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    background: var(--bg-tertiary);
    color: var(--text-light);
}

.team-member-role.admin {
    background: rgba(139, 92, 246, 0.15);
    color: #a78bfa;
}

.team-member-actions {
    display: flex;
    gap: 8px;
}

.btn-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: var(--bg-tertiary);
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.btn-icon:hover {
    border-color: var(--border-light);
    color: var(--text);
}

.btn-icon.danger:hover {
    border-color: #ef4444;
    color: #ef4444;
    background: rgba(239, 68, 68, 0.1);
}

/* Invite Form */
.invite-form {
    display: flex;
    gap: 12px;
    padding: 20px 24px;
    background: var(--bg-tertiary);
    border-top: 1px solid var(--border);
}

.invite-form input {
    flex: 1;
}

/* Notifications List */
.notification-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px;
    border-bottom: 1px solid var(--border);
    transition: background 0.2s;
}

.notification-item:hover {
    background: var(--bg-tertiary);
}

.notification-item:last-child {
    border-bottom: none;
}

.notification-item.unread {
    background: rgba(59, 130, 246, 0.05);
}

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

.notification-icon.info {
    background: rgba(59, 130, 246, 0.15);
    color: var(--primary-light);
}

.notification-icon.success {
    background: rgba(34, 197, 94, 0.15);
    color: #22c55e;
}

.notification-icon.warning {
    background: rgba(234, 179, 8, 0.15);
    color: #eab308;
}

.notification-icon.billing {
    background: rgba(139, 92, 246, 0.15);
    color: #a78bfa;
}

.notification-content {
    flex: 1;
}

.notification-content h4 {
    font-size: 14px;
    font-weight: 500;
    color: var(--text);
    margin-bottom: 4px;
}

.notification-content p {
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.5;
}

.notification-time {
    font-size: 12px;
    color: var(--text-muted);
    white-space: nowrap;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 48px 24px;
}

.empty-state-icon {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    background: var(--bg-tertiary);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 24px;
    color: var(--text-muted);
}

.empty-state h3 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 8px;
}

.empty-state p {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 20px;
}

/* Login Page */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg);
    padding: 24px;
}

.login-card {
    width: 100%;
    max-width: 420px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 40px;
}

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

.login-header .logo {
    justify-content: center;
    margin-bottom: 24px;
}

.login-header h1 {
    font-size: 24px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 8px;
}

.login-header p {
    font-size: 14px;
    color: var(--text-muted);
}

.login-divider {
    display: flex;
    align-items: center;
    gap: 16px;
    margin: 24px 0;
}

.login-divider span {
    font-size: 12px;
    color: var(--text-muted);
}

.login-divider::before,
.login-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border);
}

.btn-google {
    width: 100%;
    padding: 12px 24px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: var(--bg-tertiary);
    color: var(--text);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.2s;
}

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

.btn-google img {
    width: 18px;
    height: 18px;
}

.login-footer {
    margin-top: 24px;
    text-align: center;
    font-size: 13px;
    color: var(--text-muted);
}

.login-footer a {
    color: var(--primary-light);
    text-decoration: none;
}

.login-footer a:hover {
    text-decoration: underline;
}

/* Success Message */
.success-message {
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.2);
    border-radius: 12px;
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
}

.success-message i {
    color: #22c55e;
    font-size: 20px;
}

.success-message p {
    color: var(--text);
    font-size: 14px;
}

/* Danger Zone */
.danger-zone {
    border-color: rgba(239, 68, 68, 0.3);
}

.dashboard-section.danger-zone .section-header {
    border-bottom-color: rgba(239, 68, 68, 0.2);
}

.dashboard-section.danger-zone .section-header h2 {
    color: #ef4444;
}

.btn-danger {
    background: transparent;
    border: 1px solid rgba(239, 68, 68, 0.5);
    color: #ef4444;
}

.btn-danger:hover {
    background: rgba(239, 68, 68, 0.1);
    border-color: #ef4444;
}

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

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

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

    .mobile-menu-btn {
        display: flex !important;
    }
}

@media (max-width: 768px) {
    .dashboard-main {
        padding: 20px;
    }

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

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

    .team-member {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .team-member-actions {
        width: 100%;
    }

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

/* Credit Packs */
.credit-packs {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.credit-pack {
    background: var(--bg-secondary);
    border: 2px solid var(--border);
    border-radius: 16px;
    padding: 24px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.credit-pack::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    opacity: 0;
    transition: opacity 0.3s;
}

.credit-pack:hover {
    transform: translateY(-4px);
    border-color: transparent;
}

.credit-pack:hover::before {
    opacity: 1;
}

.credit-pack.blue::before,
.credit-pack.blue:hover {
    background: linear-gradient(135deg, #3b82f6, #60a5fa);
    border-color: rgba(59, 130, 246, 0.3);
}
.credit-pack.blue::before { background: linear-gradient(90deg, #3b82f6, #60a5fa); }

.credit-pack.purple::before,
.credit-pack.purple:hover {
    background: linear-gradient(135deg, #8b5cf6, #c084fc);
    border-color: rgba(139, 92, 246, 0.3);
}
.credit-pack.purple::before { background: linear-gradient(90deg, #8b5cf6, #c084fc); }

.credit-pack.orange::before,
.credit-pack.orange:hover {
    background: linear-gradient(135deg, #f97316, #fbbf24);
    border-color: rgba(249, 115, 22, 0.3);
}
.credit-pack.orange::before { background: linear-gradient(90deg, #f97316, #fbbf24); }

.credit-pack.popular {
    border-color: rgba(139, 92, 246, 0.4);
    background: linear-gradient(145deg, rgba(139, 92, 246, 0.08), rgba(192, 132, 252, 0.03));
}

.credit-pack-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: linear-gradient(135deg, #8b5cf6, #c084fc);
    color: white;
    font-size: 10px;
    font-weight: 600;
    padding: 4px 8px;
    border-radius: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.credit-pack-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 12px;
    font-size: 20px;
}

.credit-pack.blue .credit-pack-icon {
    background: rgba(59, 130, 246, 0.15);
    color: #60a5fa;
}

.credit-pack.purple .credit-pack-icon {
    background: rgba(139, 92, 246, 0.15);
    color: #c084fc;
}

.credit-pack.orange .credit-pack-icon {
    background: rgba(249, 115, 22, 0.15);
    color: #fb923c;
}

.credit-pack-credits {
    font-size: 36px;
    font-weight: 800;
    color: var(--text);
    line-height: 1;
}

.credit-pack-label {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 12px;
}

.credit-pack-price {
    font-size: 20px;
    font-weight: 700;
    color: var(--text);
}

.credit-pack-per {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 4px;
}

@media (max-width: 768px) {
    .credit-packs {
        grid-template-columns: 1fr;
    }
}

/* Mobile Menu Button */
.mobile-menu-btn {
    display: none;
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 56px;
    height: 56px;
    border-radius: 16px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: white;
    border: none;
    cursor: pointer;
    font-size: 20px;
    box-shadow: 0 4px 20px rgba(59, 130, 246, 0.4);
    z-index: 99;
}

/* Overlay */
.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 99;
}

.sidebar-overlay.active {
    display: block;
}
