/* ============================================
   Prototype Workspace - Professional Theme
   Blue & Red Color Scheme
   ============================================ */

:root {
    --primary: #1a56db;
    --primary-dark: #1344b0;
    --primary-light: #e8effd;
    --secondary: #dc2626;
    --secondary-dark: #b91c1c;
    --secondary-light: #fee2e2;
    
    --bg-dark: #0f172a;
    --bg-sidebar: #1e293b;
    --bg-main: #f1f5f9;
    --bg-card: #ffffff;
    
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --text-light: #94a3b8;
    --text-white: #ffffff;
    
    --border: #e2e8f0;
    --shadow: 0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.06);
    --shadow-lg: 0 10px 40px rgba(0,0,0,0.12);
    --shadow-xl: 0 20px 60px rgba(0,0,0,0.15);
    
    --radius: 12px;
    --radius-sm: 8px;
    --radius-xs: 6px;
    
    --sidebar-width: 280px;
    --header-height: 64px;
    
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-main);
    color: var(--text-primary);
    line-height: 1.6;
    overflow: hidden;
    height: 100vh;
}

#root {
    height: 100vh;
}

/* ============================================
   LOGIN PAGE
   ============================================ */

.login-page {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--bg-dark) 0%, #1a237e 50%, #1e293b 100%);
    position: relative;
    overflow: hidden;
}

.login-page::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 30% 50%, rgba(26,86,219,0.15) 0%, transparent 50%),
                radial-gradient(circle at 70% 50%, rgba(220,38,38,0.1) 0%, transparent 50%);
    animation: bgFloat 20s ease-in-out infinite;
}

@keyframes bgFloat {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    33% { transform: translate(30px, -30px) rotate(1deg); }
    66% { transform: translate(-20px, 20px) rotate(-1deg); }
}

.login-container {
    position: relative;
    z-index: 1;
    background: rgba(255,255,255,0.98);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    padding: 48px 40px;
    width: 420px;
    max-width: 90vw;
    box-shadow: var(--shadow-xl);
    animation: slideUp 0.6s ease-out;
}

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

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

.login-logo .icon {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    font-size: 28px;
    color: white;
    box-shadow: 0 8px 24px rgba(26,86,219,0.3);
}

.login-logo h1 {
    font-size: 24px;
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: -0.5px;
}

.login-logo p {
    color: var(--text-secondary);
    font-size: 14px;
    margin-top: 4px;
}

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

.login-form label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 6px;
}

.login-form .input-wrapper {
    position: relative;
}

.login-form .input-wrapper i {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-light);
    font-size: 16px;
    transition: var(--transition);
}

.login-form input {
    width: 100%;
    padding: 12px 14px 12px 42px;
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 15px;
    font-family: inherit;
    transition: var(--transition);
    background: var(--bg-main);
    color: var(--text-primary);
}

.login-form input:focus {
    outline: none;
    border-color: var(--primary);
    background: white;
    box-shadow: 0 0 0 4px rgba(26,86,219,0.1);
}

.login-form input:focus + i,
.login-form .input-wrapper:focus-within i {
    color: var(--primary);
}

.login-btn {
    width: 100%;
    padding: 14px;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 16px;
    font-weight: 700;
    font-family: inherit;
    color: white;
    cursor: pointer;
    transition: var(--transition);
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    position: relative;
    overflow: hidden;
}

.login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(26,86,219,0.4);
}

.login-btn:active {
    transform: translateY(0);
}

.login-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.login-btn .spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.login-error {
    background: var(--secondary-light);
    color: var(--secondary-dark);
    padding: 10px 14px;
    border-radius: var(--radius-xs);
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.login-error i {
    font-size: 14px;
}

/* ============================================
   MAIN LAYOUT
   ============================================ */

.app-layout {
    display: flex;
    height: 100vh;
    background: var(--bg-main);
}

/* Sidebar */
.sidebar {
    width: var(--sidebar-width);
    background: var(--bg-sidebar);
    display: flex;
    flex-direction: column;
    height: 100vh;
    position: fixed;
    left: 0;
    top: 0;
    z-index: 100;
    transition: var(--transition);
    box-shadow: 2px 0 20px rgba(0,0,0,0.1);
}

.sidebar-header {
    padding: 20px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    display: flex;
    align-items: center;
    gap: 12px;
}

.sidebar-header .logo-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 18px;
    flex-shrink: 0;
}

.sidebar-header .logo-text h2 {
    font-size: 16px;
    font-weight: 700;
    color: white;
    letter-spacing: -0.3px;
}

.sidebar-header .logo-text span {
    font-size: 11px;
    color: var(--text-light);
    font-weight: 500;
}

.sidebar-search {
    padding: 16px 20px;
}

.sidebar-search .search-wrapper {
    position: relative;
}

.sidebar-search input {
    width: 100%;
    padding: 10px 14px 10px 36px;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: var(--radius-xs);
    background: rgba(255,255,255,0.06);
    color: white;
    font-size: 13px;
    font-family: inherit;
    transition: var(--transition);
}

.sidebar-search input::placeholder {
    color: rgba(255,255,255,0.4);
}

.sidebar-search input:focus {
    outline: none;
    border-color: var(--primary);
    background: rgba(255,255,255,0.1);
}

.sidebar-search .search-wrapper i {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(255,255,255,0.3);
    font-size: 13px;
}

.sidebar-section-label {
    padding: 16px 20px 8px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: rgba(255,255,255,0.35);
}

/* Category Group in Sidebar */
.sidebar-category {
    margin-bottom: 4px;
}

.sidebar-category-header {
    padding: 12px 14px 6px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    font-weight: 600;
    color: rgba(255,255,255,0.5);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.sidebar-category-header i {
    font-size: 11px;
    color: rgba(255,255,255,0.3);
    width: 16px;
    text-align: center;
}

.sidebar-category-header .category-count {
    margin-left: auto;
    font-size: 10px;
    font-weight: 700;
    background: rgba(255,255,255,0.1);
    color: rgba(255,255,255,0.4);
    padding: 1px 7px;
    border-radius: 10px;
    min-width: 18px;
    text-align: center;
}

.sidebar-list {
    flex: 1;
    overflow-y: auto;
    padding: 0 12px 12px;
}

.sidebar-list::-webkit-scrollbar {
    width: 4px;
}

.sidebar-list::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar-list::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.15);
    border-radius: 4px;
}

.sidebar-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
    color: rgba(255,255,255,0.7);
    font-size: 14px;
    font-weight: 500;
    position: relative;
    margin-bottom: 2px;
}

.sidebar-item:hover {
    background: rgba(255,255,255,0.08);
    color: white;
}

.sidebar-item.active {
    background: rgba(26,86,219,0.2);
    color: white;
}

.sidebar-item.active::before {
    content: '';
    position: absolute;
    left: -12px;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 24px;
    background: var(--primary);
    border-radius: 0 4px 4px 0;
}

.sidebar-item .item-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    flex-shrink: 0;
    background: rgba(255,255,255,0.06);
    color: var(--primary-light);
}

.sidebar-item.active .item-icon {
    background: var(--primary);
    color: white;
}

.sidebar-item .item-info {
    flex: 1;
    min-width: 0;
}

.sidebar-item .item-name {
    font-size: 13px;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-item .item-status {
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    flex-shrink: 0;
}

.sidebar-item .item-status.show {
    background: #22c55e;
    box-shadow: 0 0 6px rgba(34,197,94,0.5);
}

.sidebar-item .item-status.hide {
    background: var(--text-light);
}

.sidebar-item .item-actions {
    display: none;
    gap: 4px;
}

.sidebar-item:hover .item-actions {
    display: flex;
}

.sidebar-item .item-actions button {
    width: 24px;
    height: 24px;
    border: none;
    border-radius: 4px;
    background: rgba(255,255,255,0.1);
    color: rgba(255,255,255,0.6);
    cursor: pointer;
    font-size: 11px;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.sidebar-item .item-actions button:hover {
    background: rgba(255,255,255,0.2);
    color: white;
}

.sidebar-item .item-actions .delete-btn:hover {
    background: rgba(220,38,38,0.3);
    color: #fca5a5;
}

.sidebar-empty {
    text-align: center;
    padding: 40px 20px;
    color: rgba(255,255,255,0.4);
}

.sidebar-empty i {
    font-size: 40px;
    margin-bottom: 12px;
    opacity: 0.5;
}

.sidebar-empty p {
    font-size: 13px;
}

/* ============================================
   HEADER
   ============================================ */

.main-content {
    margin-left: var(--sidebar-width);
    flex: 1;
    display: flex;
    flex-direction: column;
    height: 100vh;
}

.header {
    height: var(--header-height);
    background: white;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 32px;
    box-shadow: var(--shadow);
    position: relative;
    z-index: 10;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.header-left h1 {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.3px;
}

.header-left .breadcrumb {
    font-size: 13px;
    color: var(--text-secondary);
}

.header-left .breadcrumb span {
    color: var(--primary);
    font-weight: 500;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.header-btn {
    padding: 8px 16px;
    border: none;
    border-radius: var(--radius-xs);
    font-size: 13px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 8px;
}

.header-btn.primary-btn {
    background: var(--primary);
    color: white;
}

.header-btn.primary-btn:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(26,86,219,0.3);
}

.header-btn.secondary-btn {
    background: var(--bg-main);
    color: var(--text-primary);
    border: 1px solid var(--border);
}

.header-btn.secondary-btn:hover {
    background: var(--border);
}

.header-btn.danger-btn {
    background: transparent;
    color: var(--secondary);
}

.header-btn.danger-btn:hover {
    background: var(--secondary-light);
}

.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
}

.user-avatar:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(26,86,219,0.3);
}

/* ============================================
   DASHBOARD STATS
   ============================================ */

.dashboard-stats {
    display: flex;
    gap: 16px;
    padding: 16px 32px;
    background: #f8fafc;
    border-bottom: 1px solid var(--border);
}

.stat-card {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 20px;
    background: white;
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.stat-card .stat-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: white;
    flex-shrink: 0;
}

.stat-total .stat-icon {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
}

.stat-active .stat-icon {
    background: linear-gradient(135deg, #22c55e, #16a34a);
}

.stat-hidden .stat-icon {
    background: linear-gradient(135deg, #f59e0b, #d97706);
}

.stat-card .stat-info {
    display: flex;
    flex-direction: column;
}

.stat-card .stat-number {
    font-size: 24px;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1.2;
    letter-spacing: -0.5px;
}

.stat-card .stat-label {
    font-size: 12px;
    font-weight: 500;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ============================================
   CANVAS - BLOCKED FALLBACK
   ============================================ */

.canvas-blocked {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    padding: 60px 40px;
    text-align: center;
    background: white;
}

.canvas-blocked .blocked-icon {
    width: 80px;
    height: 80px;
    border-radius: 20px;
    background: var(--secondary-light);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    color: var(--secondary);
    margin-bottom: 20px;
}

.canvas-blocked h3 {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.canvas-blocked p {
    font-size: 14px;
    color: var(--text-secondary);
    max-width: 420px;
    margin-bottom: 24px;
    line-height: 1.6;
}

.canvas-blocked .blocked-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
}

/* ============================================
   POPUP MODAL (fallback for blocked iframes)
   ============================================ */

.popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.7);
    backdrop-filter: blur(6px);
    z-index: 999;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.2s ease-out;
}

.popup-modal {
    width: 92vw;
    height: 90vh;
    background: white;
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    animation: modalSlide 0.3s ease-out;
    overflow: hidden;
}

.popup-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px;
    background: #f8fafc;
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
}

.popup-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
}

.popup-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.popup-ext-link {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    background: transparent;
    transition: var(--transition);
    text-decoration: none;
}

.popup-ext-link:hover {
    background: var(--bg-main);
    color: var(--primary);
}

.popup-close-btn {
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 6px;
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 16px;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.popup-close-btn:hover {
    background: var(--secondary-light);
    color: var(--secondary);
}

.popup-body {
    flex: 1;
    overflow: hidden;
    position: relative;
}

.popup-iframe {
    width: 100%;
    height: 100%;
    border: none;
    background: white;
}

/* ============================================
   CANVAS AREA
   ============================================ */

.canvas-area {
    flex: 1;
    position: relative;
    overflow: hidden;
    background: #f8fafc;
}

.canvas-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: var(--text-light);
}

.canvas-placeholder i {
    font-size: 64px;
    margin-bottom: 16px;
    opacity: 0.4;
}

.canvas-placeholder h3 {
    font-size: 20px;
    color: var(--text-secondary);
    font-weight: 600;
    margin-bottom: 8px;
}

.canvas-placeholder p {
    font-size: 14px;
    color: var(--text-light);
}

.canvas-iframe-container {
    width: 100%;
    height: 100%;
    position: relative;
}

.canvas-iframe-container iframe {
    width: 100%;
    height: 100%;
    border: none;
    background: white;
}

.canvas-loading {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.9);
    z-index: 5;
}

.canvas-loading .loader {
    width: 40px;
    height: 40px;
    border: 4px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.canvas-iframe-container .url-bar {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    padding: 6px 16px;
    background: #f1f5f9;
    border-bottom: 1px solid var(--border);
    font-size: 12px;
    color: var(--text-light);
    font-family: 'SF Mono', 'Fira Code', monospace;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 8px;
}

.canvas-iframe-container .url-bar i {
    color: var(--primary);
    font-size: 12px;
}

.canvas-iframe-container .url-bar .url-text {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.canvas-iframe-container .url-bar .url-status {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #22c55e;
    box-shadow: 0 0 6px rgba(34,197,94,0.5);
}

/* ============================================
   SETTINGS 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: 1000;
    animation: fadeIn 0.2s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal {
    background: white;
    border-radius: 16px;
    width: 520px;
    max-width: 92vw;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-xl);
    animation: modalSlide 0.3s ease-out;
}

@keyframes modalSlide {
    from { opacity: 0; transform: translateY(20px) scale(0.97); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.modal-header {
    padding: 24px 28px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-header h2 {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.3px;
}

.modal-header .close-btn {
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 8px;
    background: var(--bg-main);
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 16px;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-header .close-btn:hover {
    background: var(--secondary-light);
    color: var(--secondary);
}

.modal-body {
    padding: 24px 28px;
}

.modal-footer {
    padding: 16px 28px 24px;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    border-top: 1px solid var(--border);
}

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

.form-group:last-child {
    margin-bottom: 0;
}

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 6px;
}

.form-group .hint {
    font-size: 12px;
    color: var(--text-light);
    margin-top: 4px;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 10px 14px;
    border: 2px solid var(--border);
    border-radius: var(--radius-xs);
    font-size: 14px;
    font-family: inherit;
    transition: var(--transition);
    background: var(--bg-main);
    color: var(--text-primary);
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary);
    background: white;
    box-shadow: 0 0 0 4px rgba(26,86,219,0.1);
}

.form-group select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2364748b' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
}

.btn {
    padding: 10px 20px;
    border: none;
    border-radius: var(--radius-xs);
    font-size: 14px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-dark);
}

.btn-secondary {
    background: var(--bg-main);
    color: var(--text-primary);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    background: var(--border);
}

.btn-danger {
    background: var(--secondary);
    color: white;
}

.btn-danger:hover {
    background: var(--secondary-dark);
}

/* ============================================
   NOTIFICATION
   ============================================ */

.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 14px 20px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 500;
    z-index: 2000;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: var(--shadow-lg);
    animation: notifSlide 0.3s ease-out;
    max-width: 380px;
}

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

.notification.success {
    background: #f0fdf4;
    color: #166534;
    border-left: 4px solid #22c55e;
}

.notification.error {
    background: var(--secondary-light);
    color: var(--secondary-dark);
    border-left: 4px solid var(--secondary);
}

.notification.info {
    background: var(--primary-light);
    color: var(--primary-dark);
    border-left: 4px solid var(--primary);
}

/* ============================================
   CONFIRM DIALOG
   ============================================ */

.confirm-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}

.confirm-dialog {
    background: white;
    border-radius: 12px;
    padding: 28px;
    width: 380px;
    max-width: 90vw;
    box-shadow: var(--shadow-xl);
    text-align: center;
}

.confirm-dialog i {
    font-size: 40px;
    color: var(--secondary);
    margin-bottom: 12px;
}

.confirm-dialog h3 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 8px;
}

.confirm-dialog p {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 20px;
}

.confirm-dialog .confirm-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
}

/* ============================================
   SCROLLBAR
   ============================================ */

::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 6px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-light);
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }
    
    .sidebar.open {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .header {
        padding: 0 16px;
    }
    
    .modal {
        width: 100%;
        max-width: 100%;
        height: 100%;
        max-height: 100%;
        border-radius: 0;
    }
}
