/* Windows Explorer Style CSS - Enhanced Version */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #333;
    min-height: 100vh;
    overflow-x: hidden;
    overflow-y: auto;
    padding: 20px;
}

/* Explorer Container */
.explorer-container {
    min-height: calc(100vh - 40px);
    display: flex;
    flex-direction: column;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.2);
    backdrop-filter: blur(10px);
}

/* Title Bar - Enhanced */
.title-bar {
    height: 40px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-bottom: 1px solid rgba(255,255,255,0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 16px;
    font-size: 13px;
    color: white;
    position: relative;
}

.title-bar::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
}

.title-bar-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.title-logo {
    width: 20px;
    height: 20px;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.title-text {
    font-weight: 500;
    text-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.title-bar-right {
    display: flex;
    gap: 2px;
}

.title-btn {
    width: 46px;
    height: 32px;
    border: none;
    background: rgba(255,255,255,0.1);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    transition: all 0.2s ease;
    backdrop-filter: blur(5px);
}

.title-btn:hover {
    background: rgba(255,255,255,0.2);
    transform: translateY(-1px);
}

.title-btn.close:hover {
    background: #e81123;
    color: white;
    box-shadow: 0 2px 8px rgba(232,17,35,0.4);
}

/* Menu Bar - Enhanced */
.menu-bar {
    height: 32px;
    background: linear-gradient(to bottom, #f8f9fa, #e9ecef);
    border-bottom: 1px solid #dee2e6;
    display: flex;
    align-items: center;
    padding: 0 16px;
    font-size: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.menu-item {
    padding: 6px 12px;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.2s ease;
    font-weight: 500;
    color: #495057;
}

.menu-item:hover {
    background: #e3f2fd;
    color: #1976d2;
    transform: translateY(-1px);
}

/* Toolbar - Enhanced */
.toolbar-explorer {
    height: 48px;
    background: linear-gradient(to bottom, #ffffff, #f8f9fa);
    border-bottom: 1px solid #dee2e6;
    display: flex;
    align-items: center;
    padding: 0 16px;
    gap: 12px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.toolbar-section {
    display: flex;
    align-items: center;
    gap: 6px;
    padding-right: 12px;
    border-right: 1px solid #dee2e6;
    position: relative;
}

.toolbar-section:last-child {
    border-right: none;
    margin-left: auto;
}

.toolbar-btn {
    width: 36px;
    height: 36px;
    border: 1px solid transparent;
    background: transparent;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    font-size: 14px;
    color: #495057;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

.toolbar-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    transition: left 0.5s ease;
}

.toolbar-btn:hover::before {
    left: 100%;
}

.toolbar-btn:hover {
    border-color: #0078d4;
    background: #e3f2fd;
    color: #1976d2;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(25,118,210,0.2);
}

.toolbar-btn.active {
    background: #0078d4;
    color: white;
    border-color: #005a9e;
    box-shadow: 0 2px 8px rgba(0,120,212,0.3);
}

/* Address Bar - Enhanced */
.address-bar {
    height: 40px;
    background: #fff;
    border-bottom: 1px solid #dee2e6;
    display: flex;
    align-items: center;
    padding: 0 16px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.address-content {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    padding: 8px 12px;
    border-radius: 8px;
    flex: 1;
    font-size: 13px;
    transition: all 0.2s ease;
}

.address-content:hover {
    border-color: #0078d4;
    box-shadow: 0 2px 8px rgba(0,120,212,0.1);
}

.address-path {
    color: #495057;
    font-weight: 500;
}

/* Main Content */
.main-content {
    flex: 1;
    display: flex;
    overflow: hidden;
}

/* Sidebar - Enhanced */
.sidebar {
    width: 220px;
    background: linear-gradient(180deg, #f8f9fa 0%, #e9ecef 100%);
    border-right: 1px solid #dee2e6;
    overflow-y: auto;
    padding: 12px 0;
    box-shadow: 2px 0 8px rgba(0,0,0,0.05);
}

.sidebar-section {
    margin-bottom: 20px;
}

.sidebar-title {
    font-size: 11px;
    color: #6c757d;
    padding: 8px 16px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.sidebar-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    cursor: pointer;
    font-size: 13px;
    color: #495057;
    transition: all 0.2s ease;
    border-radius: 0 20px 20px 0;
    margin-right: 8px;
    position: relative;
}

.sidebar-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: transparent;
    transition: background 0.2s ease;
}

.sidebar-item:hover {
    background: #e3f2fd;
    color: #1976d2;
    transform: translateX(4px);
}

.sidebar-item:hover::before {
    background: #1976d2;
}

.sidebar-item.active {
    background: linear-gradient(90deg, #e3f2fd, #bbdefb);
    color: #1976d2;
    font-weight: 500;
    box-shadow: 0 2px 8px rgba(25,118,210,0.15);
}

.sidebar-item.active::before {
    background: #1976d2;
}

.sidebar-item i {
    width: 18px;
    font-size: 14px;
    text-align: center;
}

/* Content Area */
.content-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: #fff;
    overflow: hidden;
}

/* File List Header - Enhanced */
.file-list-header {
    height: 32px;
    background: linear-gradient(to bottom, #f8f9fa, #e9ecef);
    border-bottom: 1px solid #dee2e6;
    display: flex;
    align-items: center;
    font-size: 12px;
    font-weight: 600;
    color: #495057;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.column-header {
    padding: 0 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    border-right: 1px solid #dee2e6;
    height: 100%;
    transition: all 0.2s ease;
}

.column-header:hover {
    background: #e3f2fd;
    color: #1976d2;
}

.name-column {
    flex: 2;
    min-width: 250px;
}

.date-column {
    width: 160px;
}

.type-column {
    width: 140px;
}

.size-column {
    width: 100px;
}

/* File List - Enhanced */
.file-list {
    flex: 1;
    overflow-y: auto;
    background: #fff;
}

.file-row {
    height: 40px;
    display: flex;
    align-items: center;
    cursor: pointer;
    border-bottom: 1px solid #f8f9fa;
    position: relative;
    font-size: 12px;
    transition: all 0.2s ease;
}

.file-row:hover {
    background: linear-gradient(90deg, #e3f2fd, #f3e5f5);
    transform: translateX(4px);
    box-shadow: 0 2px 8px rgba(25,118,210,0.1);
}

.file-row:nth-child(even) {
    background: #fafbfc;
}

.file-row:nth-child(even):hover {
    background: linear-gradient(90deg, #e3f2fd, #f3e5f5);
}

.file-cell {
    padding: 0 12px;
    display: flex;
    align-items: center;
    height: 100%;
    border-right: 1px solid #f8f9fa;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    transition: all 0.2s ease;
}

.name-cell {
    flex: 2;
    min-width: 250px;
    gap: 10px;
    font-weight: 500;
}

.date-cell {
    width: 160px;
    color: #6c757d;
}

.type-cell {
    width: 140px;
    color: #6c757d;
}

.size-cell {
    width: 100px;
    justify-content: flex-end;
    color: #6c757d;
    font-weight: 500;
}

.file-icon-small {
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.file-icon-small .fa-folder {
    color: #ffc107;
    text-shadow: 0 1px 2px rgba(255,193,7,0.3);
}

.file-icon-small .fa-file-pdf {
    color: #dc3545;
    text-shadow: 0 1px 2px rgba(220,53,69,0.3);
}

.file-icon-small .fa-file-word {
    color: #2b579a;
    text-shadow: 0 1px 2px rgba(43,87,154,0.3);
}

.file-icon-small .fa-file-excel {
    color: #217346;
    text-shadow: 0 1px 2px rgba(33,115,70,0.3);
}

.file-icon-small .fa-file-powerpoint {
    color: #d24726;
    text-shadow: 0 1px 2px rgba(210,71,38,0.3);
}

.file-icon-small .fa-file-image {
    color: #6f42c1;
    text-shadow: 0 1px 2px rgba(111,66,193,0.3);
}

.file-icon-small .fa-file-video {
    color: #fd7e14;
    text-shadow: 0 1px 2px rgba(253,126,20,0.3);
}

.file-icon-small .fa-file-audio {
    color: #20c997;
    text-shadow: 0 1px 2px rgba(32,201,151,0.3);
}

.file-icon-small .fa-file-archive {
    color: #6c757d;
    text-shadow: 0 1px 2px rgba(108,117,125,0.3);
}

.file-name-text {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #495057;
}

/* File Actions - Enhanced */
.file-actions-explorer {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    display: none;
    gap: 4px;
    background: rgba(255,255,255,0.95);
    padding: 4px;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    backdrop-filter: blur(10px);
}

.file-row:hover .file-actions-explorer {
    display: flex;
    animation: fadeInUp 0.3s ease;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(-50%) translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(-50%) translateY(0);
    }
}

.action-btn {
    width: 24px;
    height: 24px;
    border: none;
    background: transparent;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    font-size: 11px;
    color: #6c757d;
    transition: all 0.2s ease;
}

.action-btn:hover {
    background: #e3f2fd;
    color: #1976d2;
    transform: scale(1.1);
}

.delete-btn:hover {
    background: #ffebee;
    color: #d32f2f;
}

/* Empty Folder - Enhanced */
.empty-folder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 300px;
    color: #6c757d;
    font-size: 14px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    margin: 20px;
    border-radius: 12px;
    border: 2px dashed #dee2e6;
}

.empty-folder i {
    font-size: 64px;
    margin-bottom: 20px;
    opacity: 0.4;
    color: #adb5bd;
}

.empty-folder p {
    font-weight: 500;
    color: #6c757d;
}

/* Status Bar - Enhanced */
.status-bar {
    height: 28px;
    background: linear-gradient(to bottom, #f8f9fa, #e9ecef);
    border-top: 1px solid #dee2e6;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 16px;
    font-size: 11px;
    color: #6c757d;
    font-weight: 500;
}

/* Alerts - Enhanced */
.alert {
    margin: 12px 16px;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    border-left: 4px solid;
    animation: slideInRight 0.3s ease;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.alert-success {
    background: linear-gradient(90deg, #d4edda, #c3e6cb);
    color: #155724;
    border-left-color: #28a745;
}

.alert-error {
    background: linear-gradient(90deg, #f8d7da, #f5c6cb);
    color: #721c24;
    border-left-color: #dc3545;
}

/* Modal Styles - Enhanced */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.6);
    backdrop-filter: blur(4px);
}

.modal-content {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    margin: 10% auto;
    padding: 2rem;
    border-radius: 12px;
    width: 90%;
    max-width: 500px;
    position: relative;
    box-shadow: 0 20px 40px rgba(0,0,0,0.2);
    border: 1px solid rgba(255,255,255,0.2);
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(-30px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.close {
    position: absolute;
    right: 1rem;
    top: 1rem;
    font-size: 1.5rem;
    cursor: pointer;
    color: #6c757d;
    transition: all 0.2s ease;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.close:hover {
    color: #dc3545;
    background: #ffebee;
    transform: rotate(90deg);
}

/* Form Styles - Enhanced */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s ease;
    background: #fff;
}

.form-group input:focus {
    outline: none;
    border-color: #0078d4;
    box-shadow: 0 0 0 3px rgba(0,120,212,0.1);
    transform: translateY(-1px);
}

/* Button Styles - Enhanced */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    font-weight: 600;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: left 0.5s ease;
}

.btn:hover::before {
    left: 100%;
}

.btn-primary {
    background: linear-gradient(135deg, #0078d4 0%, #005a9e 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(0,120,212,0.3);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #005a9e 0%, #004578 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0,120,212,0.4);
}

.btn-full {
    width: 100%;
    justify-content: center;
}

/* Responsive Design - Enhanced */
@media (max-width: 768px) {
    body {
        padding: 10px;
    }
    
    .explorer-container {
        border-radius: 8px;
    }
    
    .sidebar {
        width: 60px;
        overflow: hidden;
    }
    
    .sidebar-item span {
        display: none;
    }
    
    .toolbar-explorer {
        padding: 0 8px;
        gap: 8px;
    }
    
    .file-list-header {
        font-size: 11px;
    }
    
    .file-row {
        height: 48px;
    }
    
    .name-column {
        min-width: 200px;
    }
    
    .date-column {
        width: 120px;
    }
    
    .type-column {
        width: 100px;
    }
    
    .size-column {
        width: 80px;
    }
}

@media (max-width: 480px) {
    .explorer-container {
        height: 100vh;
        border-radius: 0;
    }
    
    .title-bar {
        height: 36px;
        padding: 0 12px;
    }
    
    .toolbar-explorer {
        height: 40px;
        padding: 0 6px;
    }
    
    .toolbar-btn {
        width: 32px;
        height: 32px;
        font-size: 12px;
    }
    
    .file-list-header {
        height: 28px;
        font-size: 10px;
    }
    
    .file-row {
        height: 44px;
        font-size: 11px;
    }
    
    .file-cell {
        padding: 0 8px;
    }
}

/* Enhanced Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #c1c1c1, #a8a8a8);
    border-radius: 4px;
    border: 1px solid #f1f1f1;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #a8a8a8, #8f8f8f);
}

/* Loading Animation - Enhanced */
.loading {
    display: inline-block;
    width: 24px;
    height: 24px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #0078d4;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    box-shadow: 0 2px 8px rgba(0,120,212,0.2);
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Focus States - Enhanced */
input:focus, button:focus {
    outline: 2px solid #0078d4;
    outline-offset: 2px;
}

/* Smooth Transitions */
* {
    transition: all 0.2s ease;
}

/* Hover Effects - Enhanced */
.file-row:hover {
    background: linear-gradient(90deg, #e3f2fd, #f3e5f5) !important;
    transform: translateX(4px);
    box-shadow: 0 4px 12px rgba(25,118,210,0.15);
}

/* Selection Styles */
.file-row.selected {
    background: linear-gradient(90deg, #bbdefb, #e1bee7) !important;
    border-left: 4px solid #1976d2;
}

/* Animation for new items */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.file-row {
    animation: fadeIn 0.3s ease;
}

/* Enhanced shadows and depth */
.explorer-container {
    box-shadow: 0 20px 40px rgba(0,0,0,0.1), 0 0 0 1px rgba(255,255,255,0.1);
}

.modal-content {
    box-shadow: 0 20px 40px rgba(0,0,0,0.2), 0 0 0 1px rgba(255,255,255,0.1);
}

/* Glass morphism effect for modern look */
.title-bar, .toolbar-explorer, .file-list-header {
    backdrop-filter: blur(10px);
}

/* Enhanced color scheme */
:root {
    --primary-color: #0078d4;
    --primary-light: #e3f2fd;
    --primary-dark: #005a9e;
    --success-color: #28a745;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #17a2b8;
    --light-color: #f8f9fa;
    --dark-color: #343a40;
    --border-color: #dee2e6;
    --text-primary: #495057;
    --text-secondary: #6c757d;
    --text-muted: #adb5bd;
}

/* Login Page Styles - Final Fixed Version */

/* Login Page Body */
.login-page {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* Login Container */
.login-container {
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
}

/* Login Box */
.login-box {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 16px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    padding: 2.5rem 2rem;
    width: 100%;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Login Logo */
.login-logo {
    width: 70px;
    height: 70px;
    border-radius: 12px;
    margin: 0 auto 1.5rem;
    display: block;
    object-fit: cover;
    border: 2px solid rgba(102, 126, 234, 0.2);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.2);
}

/* Login Header */
.login-header {
    text-align: center;
    margin-bottom: 2rem;
}

.login-header h1 {
    color: #2d3748;
    margin: 0.5rem 0;
    font-size: 2rem;
    font-weight: 700;
    background: linear-gradient(135deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.login-header p {
    color: #718096;
    font-size: 0.95rem;
    margin: 0;
    font-weight: 500;
}

/* Tab Navigation - Final Fixed */
.tab-navigation {
    display: flex;
    margin-bottom: 2rem;
    background: #f7fafc;
    border-radius: 10px;
    padding: 4px;
    position: relative;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.tab-navigation::before {
    content: '';
    position: absolute;
    top: 4px;
    left: 4px;
    width: calc(50% - 4px);
    height: calc(100% - 8px);
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-radius: 6px;
    transition: transform 0.3s ease;
    z-index: 1;
}

.tab-navigation.register-active::before {
    transform: translateX(100%);
}

.tab-btn {
    flex: 1;
    padding: 0.875rem 1.25rem;
    border: none;
    background: transparent;
    cursor: pointer;
    font-size: 0.95rem;
    color: #718096;
    border-radius: 6px;
    transition: all 0.3s ease;
    font-weight: 600;
    position: relative;
    z-index: 2;
}

.tab-btn.active {
    color: white;
}

.tab-btn:hover:not(.active) {
    color: #667eea;
}

/* Tab Content */
.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* Login Form - Final Fixed */
.login-form {
    margin-bottom: 2rem;
}

.form-group {
    margin-bottom: 1.5rem;
    position: relative;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #2d3748;
    font-size: 0.9rem;
}

.form-group input {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    background: #f8fafc;
    color: #2d3748;
    box-sizing: border-box;
}

.form-group input:focus {
    outline: none;
    border-color: #667eea;
    background: white;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* Button Styles - Final Fixed */
.btn {
    padding: 0.875rem 1.5rem;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.95rem;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    font-weight: 600;
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #5a67d8 0%, #6b46c1 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.btn-full {
    width: 100%;
    justify-content: center;
    padding: 1rem 1.5rem;
    font-size: 1rem;
}

/* Login Info - Final Fixed */
.login-info {
    background: linear-gradient(135deg, #f7fafc 0%, #edf2f7 100%);
    padding: 1.25rem;
    border-radius: 10px;
    border-left: 4px solid #667eea;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.login-info h4 {
    margin: 0 0 0.75rem 0;
    color: #2d3748;
    font-size: 0.95rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.login-info h4::before {
    content: '💡';
    font-size: 1rem;
}

.login-info p {
    margin: 0.375rem 0;
    font-size: 0.85rem;
    color: #4a5568;
    line-height: 1.5;
}

.login-info p:last-child {
    margin-top: 0.75rem;
    font-style: italic;
    color: #718096;
    font-size: 0.8rem;
}

.login-info strong {
    color: #667eea;
    font-weight: 700;
}

/* Alert Styles - Final Fixed */
.alert {
    padding: 0.875rem 1.25rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
    font-weight: 500;
    border-left: 4px solid;
}

.alert-success {
    background: linear-gradient(135deg, #c6f6d5 0%, #9ae6b4 100%);
    color: #22543d;
    border-left-color: #38a169;
    box-shadow: 0 2px 8px rgba(56, 161, 105, 0.2);
}

.alert-error {
    background: linear-gradient(135deg, #fed7d7 0%, #feb2b2 100%);
    color: #742a2a;
    border-left-color: #e53e3e;
    box-shadow: 0 2px 8px rgba(229, 62, 62, 0.2);
}

/* Responsive Login - Final Fixed */
@media (max-width: 480px) {
    .login-container {
        padding: 0;
    }
    
    .login-box {
        padding: 2rem 1.5rem;
        border-radius: 12px;
        margin: 10px;
    }
    
    .login-logo {
        width: 60px;
        height: 60px;
    }
    
    .login-header h1 {
        font-size: 1.75rem;
    }
    
    .login-header p {
        font-size: 0.9rem;
    }
    
    .tab-btn {
        padding: 0.75rem 1rem;
        font-size: 0.9rem;
    }
    
    .btn-full {
        padding: 0.875rem 1.25rem;
        font-size: 0.95rem;
    }
    
    .login-info {
        padding: 1rem;
    }
}

/* Loading state for buttons */
.btn.loading {
    position: relative;
    color: transparent;
}

.btn.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 18px;
    height: 18px;
    margin: -9px 0 0 -9px;
    border: 2px solid transparent;
    border-top: 2px solid currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Enhanced focus states for accessibility */
.btn:focus,
input:focus,
.tab-btn:focus {
    outline: 2px solid #667eea;
    outline-offset: 2px;
}

/* Preview Modal Styles */
.preview-modal .modal-content {
    max-width: 95%;
    width: 95%;
    height: 90vh;
    margin: 5vh auto;
    padding: 0;
    display: flex;
    flex-direction: column;
}

.preview-modal.preview-fullscreen .modal-content {
    width: 100%;
    height: 100vh;
    margin: 0;
    max-width: 100%;
    border-radius: 0;
}

.preview-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-radius: 12px 12px 0 0;
}

.preview-modal.preview-fullscreen .preview-header {
    border-radius: 0;
}

.preview-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    font-size: 16px;
}

.preview-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

.preview-actions .btn {
    padding: 8px 16px;
    font-size: 13px;
}

.preview-close {
    background: rgba(255,255,255,0.2);
    border: none;
    color: white;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.preview-close:hover {
    background: rgba(255,255,255,0.3);
    transform: rotate(90deg);
}

.preview-body {
    flex: 1;
    overflow: auto;
    background: #f8f9fa;
    border-radius: 0 0 12px 12px;
}

.preview-modal.preview-fullscreen .preview-body {
    border-radius: 0;
}

.preview-content {
    padding: 20px;
    min-height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.preview-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 20px;
    padding: 50px;
}

.preview-loading .loading {
    width: 40px;
    height: 40px;
}

.preview-error,
.preview-unsupported {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 50px;
    text-align: center;
    color: #6c757d;
}

.preview-error i,
.preview-unsupported i {
    font-size: 64px;
    color: #dc3545;
    margin-bottom: 20px;
}

.preview-unsupported i {
    color: #6c757d;
}

.preview-error h3,
.preview-unsupported h3 {
    color: #495057;
    margin-bottom: 10px;
}

.preview-error p,
.preview-unsupported p {
    color: #6c757d;
    margin: 5px 0;
}

/* Success animation for form submission */
@keyframes successPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.01); }
}

.login-form.success {
    animation: successPulse 0.6s ease;
}