* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Toast Notifications */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 400px;
    pointer-events: none;
}

.toast {
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    opacity: 0;
    transform: translateX(100%);
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    pointer-events: all;
    overflow: hidden;
    position: relative;
}

.toast.toast-show {
    opacity: 1;
    transform: translateX(0);
}

.toast-content {
    display: flex;
    align-items: center;
    padding: 16px 20px;
    gap: 12px;
    position: relative;
}

.toast-icon {
    flex-shrink: 0;
    font-size: 20px;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.toast-message {
    flex: 1;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.4;
    color: #374151;
}

.toast-close {
    background: none;
    border: none;
    font-size: 14px;
    color: #9ca3af;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.toast-close:hover {
    background: rgba(0, 0, 0, 0.05);
    color: #374151;
}

/* Toast Types */
.toast-success {
    border-left: 4px solid #10b981;
}

.toast-success .toast-icon {
    color: #10b981;
}

.toast-error {
    border-left: 4px solid #ef4444;
}

.toast-error .toast-icon {
    color: #ef4444;
}

.toast-warning {
    border-left: 4px solid #f59e0b;
}

.toast-warning .toast-icon {
    color: #f59e0b;
}

.toast-info {
    border-left: 4px solid #3b82f6;
}

.toast-info .toast-icon {
    color: #3b82f6;
}

/* Progress bar animation */
.toast::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    height: 2px;
    background: currentColor;
    width: 100%;
    transform: scaleX(1);
    transform-origin: left;
    animation: toast-progress 4s linear forwards;
    opacity: 0.3;
}

@keyframes toast-progress {
    to {
        transform: scaleX(0);
    }
}

.toast-success::after {
    background: #10b981;
}

.toast-error::after {
    background: #ef4444;
}

.toast-warning::after {
    background: #f59e0b;
}

.toast-info::after {
    background: #3b82f6;
}

/* Mobile Responsive - Show toasts at bottom */
@media (max-width: 768px) {
    .toast-container {
        top: auto;
        bottom: 20px;
        left: 20px;
        right: 20px;
        max-width: none;
        align-items: stretch;
    }
    
    .toast {
        transform: translateY(100%);
        margin: 0;
    }
    
    .toast.toast-show {
        transform: translateY(0);
    }
    
    .toast-content {
        padding: 14px 16px;
    }
    
    .toast-message {
        font-size: 13px;
    }
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
}

/* Login & Register */
.auth-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

.auth-card {
    background: rgba(255, 255, 255, 0.95);
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    width: 100%;
    max-width: 400px;
    animation: slideUp 0.6s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

.auth-header h1 {
    color: #4a5568;
    font-size: 2rem;
    margin-bottom: 10px;
}

.auth-header p {
    color: #718096;
    font-size: 1rem;
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #4a5568;
    font-weight: 500;
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: white;
}

.form-control:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.btn {
    padding: 12px 20px;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.3);
}

.auth-switch {
    text-align: center;
    margin-top: 20px;
}

.auth-switch a {
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
}

.auth-switch a:hover {
    text-decoration: underline;
}

/* Navigation Bar */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    z-index: 1001;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.navbar-brand {
    display: flex;
    align-items: center;
    color: #4a5568;
    font-weight: 600;
    font-size: 1.2rem;
    text-decoration: none;
}

.navbar-brand i {
    margin-right: 10px;
    color: #667eea;
}

.navbar-user {
    display: flex;
    align-items: center;
    gap: 15px;
}

.profile-section {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 25px;
    transition: all 0.3s ease;
    position: relative;
}

.profile-section:hover {
    background: rgba(102, 126, 234, 0.1);
}

.profile-picture {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid #667eea;
    background: linear-gradient(135deg, #667eea, #764ba2);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 1.1rem;
    overflow: hidden;
    position: relative;
}

.profile-picture img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.profile-picture-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

.profile-info {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.profile-name {
    color: #4a5568;
    font-weight: 600;
    font-size: 0.9rem;
    margin: 0;
}

.profile-role {
    color: #718096;
    font-size: 0.8rem;
    margin: 0;
}

.profile-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border-radius: 10px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(0, 0, 0, 0.1);
    min-width: 200px;
    padding: 10px 0;
    display: none;
    z-index: 1002;
}

.profile-dropdown.show {
    display: block;
    animation: slideDown 0.2s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.dropdown-item {
    display: block;
    padding: 10px 20px;
    color: #4a5568;
    text-decoration: none;
    transition: all 0.2s ease;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    cursor: pointer;
}

.dropdown-item:hover {
    background: rgba(102, 126, 234, 0.1);
    color: #667eea;
}

.dropdown-item i {
    margin-right: 10px;
    width: 16px;
}

.dropdown-divider {
    height: 1px;
    background: rgba(0, 0, 0, 0.1);
    margin: 5px 0;
}

.profile-upload-btn {
    position: absolute;
    bottom: -5px;
    right: -5px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #667eea;
    border: 2px solid white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.profile-upload-btn:hover {
    background: #5a67d8;
    transform: scale(1.1);
}

.profile-upload-btn i {
    color: white;
    font-size: 0.7rem;
}

#profileImageInput {
    display: none;
}

/* Dashboard */
.dashboard {
    /* display: none; */
    padding-top: 60px; /* Account for fixed navbar */
}

.sidebar {
    position: fixed;
    left: 0;
    top: 60px; /* Account for navbar */
    width: 250px;
    height: calc(100vh - 60px); /* Adjust height for navbar */
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-right: 1px solid rgba(255, 255, 255, 0.2);
    z-index: 1000;
    transition: all 0.3s ease;
}

.sidebar-header {
    padding: 20px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    text-align: center;
}

.sidebar-header h3 {
    color: #4a5568;
    font-size: 1.2rem;
    margin-bottom: 5px;
}

.sidebar-header p {
    color: #718096;
    font-size: 0.9rem;
}

.sidebar-menu {
    padding: 20px 0;
}

.menu-item {
    display: block;
    padding: 15px 20px;
    color: #4a5568;
    text-decoration: none;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
}

.menu-item:hover,
.menu-item.active {
    background: rgba(102, 126, 234, 0.1);
    border-left-color: #667eea;
    color: #667eea;
}

.menu-item i {
    margin-right: 10px;
    width: 20px;
}

.main-content {
    margin-left: 250px;
    padding: 20px;
    min-height: 100vh;
}

.page-header {
    background: rgba(255, 255, 255, 0.95);
    padding: 20px 30px;
    border-radius: 15px;
    margin-bottom: 20px;
    backdrop-filter: blur(20px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
}

.page-header h1 {
    color: #4a5568;
    font-size: 1.8rem;
    margin-bottom: 5px;
}

.page-header p {
    color: #718096;
}

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

.stat-card {
    background: rgba(255, 255, 255, 0.95);
    padding: 25px;
    border-radius: 15px;
    backdrop-filter: blur(20px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
}

.stat-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 15px;
    font-size: 1.5rem;
}

.stat-icon.products { background: linear-gradient(135deg, #667eea, #764ba2); color: white; }
.stat-icon.orders { background: linear-gradient(135deg, #48bb78, #38a169); color: white; }
.stat-icon.stock { background: linear-gradient(135deg, #ed8936, #dd6b20); color: white; }
.stat-icon.channels { background: linear-gradient(135deg, #9f7aea, #805ad5); color: white; }

/* Additional stat-icon styles for orders page */
.stat-icon.processing { background: linear-gradient(135deg, #3b82f6, #2563eb); color: white; }
.stat-icon.completed { background: linear-gradient(135deg, #10b981, #059669); color: white; }
.stat-icon.total { background: linear-gradient(135deg, #6366f1, #4f46e5); color: white; }

/* Additional stat-icon styles for channels page */
.stat-icon.connected { background: linear-gradient(135deg, #22c55e, #16a34a); color: white; }
.stat-icon.disconnected { background: linear-gradient(135deg, #ef4444, #dc2626); color: white; }
.stat-icon.sync { background: linear-gradient(135deg, #06b6d4, #0891b2); color: white; }

/* Additional stat-icon styles for stock page */
.stat-icon.low-stock { background: linear-gradient(135deg, #f59e0b, #d97706); color: white; }
.stat-icon.out-of-stock { background: linear-gradient(135deg, #f87171, #ef4444); color: white; }
.stat-icon.total-value { background: linear-gradient(135deg, #8b5cf6, #7c3aed); color: white; }

.stat-value {
    font-size: 2rem;
    font-weight: bold;
    color: #4a5568;
    margin-bottom: 5px;
}

.stat-label {
    color: #718096;
    font-size: 0.9rem;
}

.data-table {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    backdrop-filter: blur(20px);
    margin-bottom: 1rem;
}

.table-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 30px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.table-header h3 {
    color: #4a5568;
    font-size: 1.3rem;
}

.btn-sm { padding: 8px 16px; font-size: 0.9rem; border-radius: 8px; }
.btn-success { background: linear-gradient(135deg, #48bb78, #38a169); color: white; border: none; }
.btn-success:hover { transform: translateY(-1px); box-shadow: 0 5px 15px rgba(72, 187, 120, 0.3); }

table { width: 100%; border-collapse: collapse; }
th, td { padding: 15px 30px; text-align: left; border-bottom: 1px solid rgba(0, 0, 0, 0.05); }
th { background: rgba(102, 126, 234, 0.05); color: #4a5568; font-weight: 600; }
td { color: #718096; }

.badge { padding: 5px 10px; border-radius: 15px; font-size: 0.8rem; font-weight: 500; }
.badge-success { background: rgba(72, 187, 120, 0.1); color: #38a169; }
.badge-warning { background: rgba(237, 137, 54, 0.1); color: #dd6b20; }
.badge-danger { background: rgba(245, 101, 101, 0.1); color: #e53e3e; }

.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
}

.modal-content {
    background: white;
    margin: 5% auto;
    padding: 30px;
    border-radius: 15px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    animation: slideUp 0.3s ease-out;
}

.modal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; padding-bottom: 15px; border-bottom: 1px solid rgba(0, 0, 0, 0.1); }
.modal-header h3 { color: #4a5568; font-size: 1.3rem; }
.close { background: none; border: none; font-size: 1.5rem; cursor: pointer; color: #718096; }
.close:hover { color: #4a5568; }

.page { display: none; }
.page.active { display: block; }

.channel-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; }
.channel-card { background: rgba(255, 255, 255, 0.95); padding: 25px; border-radius: 15px; backdrop-filter: blur(20px); box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08); transition: transform 0.3s ease; }
.channel-card:hover { transform: translateY(-5px); }
.channel-header { display: flex; align-items: center; margin-bottom: 15px; }
.channel-logo { width: 40px; height: 40px; margin-right: 15px; border-radius: 8px; }
.shopee { background: linear-gradient(135deg, #ee4d2d, #ff6600); }
.tiktok { background: linear-gradient(135deg, #ff0050, #25f4ee); }
.lineshop { background: linear-gradient(135deg, #00c300, #06c755); }
.channel-status { margin-left: auto; }
.sync-btn { width: 100%; margin-top: 15px; }

/* Mobile Responsive Channels */
.desktop-table-view { display: block; }
.mobile-card-view { display: none; }

.channels-section .section-header {
    background: rgba(255, 255, 255, 0.95);
    padding: 20px 30px;
    border-radius: 15px;
    margin-bottom: 20px;
    backdrop-filter: blur(20px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
}

.channels-section .section-header h3 {
    color: #4a5568;
    font-size: 1.3rem;
    margin: 0;
}

.mobile-card-view .channel-cards {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.mobile-card-view .channel-card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 16px;
    padding: 20px;
    backdrop-filter: blur(20px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.mobile-card-view .channel-header {
    margin-bottom: 16px;
}

.mobile-card-view .channel-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.mobile-card-view .channel-logo {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 20px;
    flex-shrink: 0;
}

.mobile-card-view .channel-logo.shopee { 
    background: linear-gradient(135deg, #ee4d2d, #ff6600); 
}
.mobile-card-view .channel-logo.tiktok { 
    background: linear-gradient(135deg, #ff0050, #25f4ee); 
}
.mobile-card-view .channel-logo.lineshop { 
    background: linear-gradient(135deg, #00c300, #06c755); 
}

.mobile-card-view .channel-details {
    flex: 1;
}

.mobile-card-view .channel-name {
    font-size: 1.1rem;
    font-weight: 600;
    color: #2d3748;
    margin: 0 0 8px 0;
}

.mobile-card-view .channel-sync-info {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #718096;
    font-size: 0.9rem;
    margin-bottom: 16px;
    padding: 8px 12px;
    background: rgba(102, 126, 234, 0.05);
    border-radius: 8px;
}

.mobile-card-view .channel-sync-info i {
    color: #667eea;
}

.mobile-card-view .channel-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.mobile-card-view .connected-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.mobile-card-view .action-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.btn-mobile {
    width: 100%;
    padding: 12px 16px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.btn-mobile-sm {
    padding: 10px 16px;
    font-size: 0.9rem;
    font-weight: 600;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: all 0.3s ease;
}

.btn-mobile:hover, .btn-mobile-sm:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.btn-info {
    background: linear-gradient(135deg, #4299e1, #3182ce);
    color: white;
    border: none;
}

.btn-info:hover {
    box-shadow: 0 4px 12px rgba(66, 153, 225, 0.3);
}

.btn-danger {
    background: linear-gradient(135deg, #f56565, #e53e3e);
    color: white;
    border: none;
}

.btn-danger:hover {
    box-shadow: 0 4px 12px rgba(245, 101, 101, 0.3);
}

.btn-warning {
    background: linear-gradient(135deg, #ed8936, #dd6b20);
    color: white;
    border: none;
}

.btn-warning:hover {
    box-shadow: 0 4px 12px rgba(237, 137, 54, 0.3);
}

@media (max-width: 768px) {
    .sidebar { transform: translateX(-100%); top: 60px; }
    .sidebar.active { transform: translateX(0); }
    .main-content { margin-left: 0; padding: 15px; }
    .stats-grid { 
        grid-template-columns: 1fr 1fr; 
        gap: 12px;
    }
    .stat-card {
        padding: 16px;
        text-align: center;
    }
    .stat-card .stat-icon {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
        margin: 0 auto 12px auto;
    }
    .stat-card .stat-value {
        font-size: 1.5rem;
        margin-bottom: 4px;
    }
    .stat-card .stat-label {
        font-size: 0.8rem;
        line-height: 1.2;
    }
    .navbar { padding: 0 15px; }
    .navbar-brand { font-size: 1.1rem; }
    .profile-info { display: none; }
    .profile-picture { width: 35px; height: 35px; }
    
    /* Hide desktop table, show mobile cards */
    .desktop-table-view { display: none; }
    .mobile-card-view { display: block; }
    
    /* Page header adjustments */
    .page-header {
        padding: 15px 20px;
        margin-bottom: 15px;
    }
    
    .page-header h1 {
        font-size: 1.5rem;
    }
    
    .page-header button {
        padding: 10px 16px;
        font-size: 0.9rem;
    }
    
    .channels-section .section-header {
        padding: 15px 20px;
        margin-bottom: 15px;
    }
    
    .channels-section .section-header h3 {
        font-size: 1.2rem;
    }
    
    /* Modal responsive */
    .modal.mobile-responsive .modal-content {
        margin: 10px;
        width: calc(100% - 20px);
        max-width: none;
        max-height: calc(100vh - 40px);
        padding: 20px;
    }
    
    .modal.mobile-responsive .modal-header h4 {
        font-size: 1.2rem;
    }
    
    .modal.mobile-responsive .config-section {
        padding: 20px;
        margin-bottom: 20px;
    }
    
    .modal.mobile-responsive .config-section h4 {
        font-size: 1.1rem;
    }
    
    .modal.mobile-responsive .form-group {
        margin-bottom: 15px;
    }
    
    .modal.mobile-responsive .form-control {
        padding: 10px 12px;
    }
    
    .modal.mobile-responsive .setup-steps {
        padding: 15px;
    }
    
    .modal.mobile-responsive .setup-steps ol {
        font-size: 0.9rem;
    }
    
    .modal.mobile-responsive .modal-footer {
        flex-direction: column;
        gap: 10px;
    }
    
    .modal.mobile-responsive .modal-footer .btn {
        width: 100%;
        padding: 12px;
    }
    
    /* Event tags responsive */
    .event-tags {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .event-tags .badge {
        margin-bottom: 5px;
    }
    
    /* Touch-friendly adjustments */
    .mobile-card-view .channel-card {
        transition: all 0.2s ease;
        cursor: default;
    }
    
    .mobile-card-view .channel-card:active {
        transform: scale(0.98);
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    }
    
    .btn-mobile:active, .btn-mobile-sm:active {
        transform: scale(0.95);
    }
    
    /* Improved touch targets */
    .mobile-card-view .btn-mobile,
    .mobile-card-view .btn-mobile-sm {
        min-height: 44px; /* Apple's recommended touch target size */
        touch-action: manipulation; /* Prevents zoom on double-tap */
    }
    
    /* Better scrolling on mobile */
    .modal.mobile-responsive .modal-content {
        -webkit-overflow-scrolling: touch;
        overflow-y: auto;
    }
    
    /* Prevent text selection on buttons */
    .btn-mobile, .btn-mobile-sm {
        -webkit-user-select: none;
        -moz-user-select: none;
        -ms-user-select: none;
        user-select: none;
        -webkit-tap-highlight-color: transparent;
    }
}

/* Extra small screens (phones < 480px) */
@media (max-width: 480px) {
    .stats-grid { 
        grid-template-columns: 1fr; 
        gap: 10px;
    }
    
    .mobile-card-view .channel-card {
        padding: 16px;
    }
    
    .mobile-card-view .channel-logo {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }
    
    .mobile-card-view .channel-name {
        font-size: 1rem;
    }
    
    .mobile-card-view .channel-sync-info {
        font-size: 0.8rem;
        padding: 6px 10px;
    }
    
    .btn-mobile {
        padding: 10px 14px;
        font-size: 0.9rem;
    }
    
    .btn-mobile-sm {
        padding: 8px 12px;
        font-size: 0.8rem;
    }
    
    .page-header h1 {
        font-size: 1.3rem;
    }
    
    .channels-section .section-header h3 {
        font-size: 1.1rem;
    }
    
    .modal.mobile-responsive .modal-content {
        margin: 5px;
        width: calc(100% - 10px);
        padding: 15px;
    }
    
    .modal.mobile-responsive .modal-header h4 {
        font-size: 1.1rem;
    }
    
    .modal.mobile-responsive .config-section {
        padding: 15px;
        margin-bottom: 15px;
    }
}

.alert { padding: 15px 20px; border-radius: 10px; margin-bottom: 20px; border: none; font-weight: 500; }
.alert-success { background: rgba(72, 187, 120, 0.1); color: #38a169; border-left: 4px solid #38a169; }
.alert-error { background: rgba(245, 101, 101, 0.1); color: #e53e3e; border-left: 4px solid #e53e3e; }

/* Profile Picture in Profile Page */
.profile-picture-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    padding: 20px;
    text-align: center;
}

.profile-picture-display {
    position: relative;
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.3);
    transition: all 0.3s ease;
    border: 3px solid #667eea;
}

.profile-picture-display:hover {
    transform: scale(1.02);
    box-shadow: 0 6px 25px rgba(102, 126, 234, 0.4);
}

.profile-picture-display img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.profile-picture-display .profile-picture-placeholder {
    color: white;
    font-size: 32px;
    font-weight: 600;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

.profile-picture-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
}

.btn-outline-danger {
    background: transparent;
    border: 2px solid #ef4444;
    color: #ef4444;
    padding: 8px 16px;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.3s ease;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-outline-danger:hover {
    background: #ef4444;
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

/* Readonly inputs styling */
.readonly-input {
    background-color: #f8fafc !important;
    border-color: #e2e8f0 !important;
    color: #64748b !important;
    cursor: not-allowed !important;
}

.readonly-input:focus {
    box-shadow: none !important;
    border-color: #e2e8f0 !important;
}

.form-help {
    display: block;
    margin-top: 5px;
    font-size: 12px;
    color: #64748b;
    font-style: italic;
}

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }

/* Profile Form Styles */
.form-card {
    background: rgba(255, 255, 255, 0.95);
    padding: 30px;
    border-radius: 15px;
    backdrop-filter: blur(20px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    max-width: 600px;
    margin-bottom: 1rem;
}

.form-card .form-row {
    margin-bottom: 20px;
}

.form-card label {
    display: block;
    margin-bottom: 8px;
    color: #4a5568;
    font-weight: 500;
}

.form-card input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: white;
}

.form-card input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-actions {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.logout-btn { position: absolute; top: 20px; right: 20px; background: rgba(245, 101, 101, 0.1); color: #e53e3e; border: 1px solid rgba(245, 101, 101, 0.3); padding: 8px 16px; border-radius: 8px; cursor: pointer; transition: all 0.3s ease; }
.logout-btn:hover { background: rgba(245, 101, 101, 0.2); }

.modal-footer{
    display:flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}

/* TikTok Configuration Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    padding: 20px;
}

.modal-content.large {
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
    width: 100%;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid #e2e8f0;
}

.modal-header h3 {
    color: #2d3748;
    font-size: 1.5rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.modal-close {
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    color: #718096;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s;
}

.modal-close:hover {
    background: rgba(245, 101, 101, 0.1);
    color: #e53e3e;
}

.modal-body {
    padding: 0;
}

.config-section {
    margin-bottom: 30px;
    padding: 25px;
    background: #f7fafc;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
}

.config-section h4 {
    color: #2d3748;
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.config-section h4 i {
    color: #4299e1;
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #4a5568;
    font-weight: 500;
}

.input-group {
    position: relative;
    display: flex;
}

.input-group .form-control {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
    border-right: none;
}

.input-group-append {
    display: flex;
}

.input-group-append .btn {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
    border-left: 1px solid #cbd5e0;
}

.webhook-events {
    margin-top: 15px;
}

.webhook-events label {
    display: block;
    margin-bottom: 10px;
    color: #4a5568;
    font-weight: 500;
}

.event-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.event-tags .badge {
    padding: 6px 12px;
    font-size: 0.85rem;
}

.setup-steps {
    background: white;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.setup-steps ol {
    padding-left: 20px;
    line-height: 1.6;
}

.setup-steps ol li {
    margin-bottom: 10px;
    color: #4a5568;
}

.setup-steps ul {
    margin: 8px 0;
    padding-left: 20px;
}

.setup-steps ul li {
    margin-bottom: 5px;
    color: #718096;
}

.setup-steps code {
    background: #edf2f7;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.9em;
    color: #2d3748;
}

.setup-steps a {
    color: #4299e1;
    text-decoration: none;
}

.setup-steps a:hover {
    text-decoration: underline;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 12px;
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid #e2e8f0;
}

.text-muted {
    color: #718096;
}

/* Footer Styles */
.app-footer {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px 0;
    margin-top: 40px;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    text-align: center;
}

.footer-info p {
    margin: 5px 0;
    font-size: 14px;
    opacity: 0.9;
}

.footer-info .developer-info {
    font-size: 15px;
    margin-bottom: 8px;
}

.footer-info .copyright {
    font-size: 13px;
    opacity: 0.8;
}

.footer-info strong {
    font-weight: 600;
    color: #fff;
}

