/* Sanicanin Private Homepage - Light Theme */

:root {
    --bg-primary: #ffffff;
    --bg-secondary: #f8fafc;
    --bg-tertiary: #f1f5f9;
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #94a3b8;
    --border: #e2e8f0;
    --border-light: #f1f5f9;
    
    /* Accent colors */
    --accent: #3b82f6;
    --accent-hover: #2563eb;
    --accent-light: #eff6ff;
    --accent-lighter: #dbeafe;
    
    /* Status colors */
    --success: #10b981;
    --success-bg: #d1fae5;
    --warning: #f59e0b;
    --warning-bg: #fef3c7;
    --error: #ef4444;
    --error-bg: #fee2e2;
    --offline: #6b7280;
    
    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
    
    /* Transitions */
    --transition-fast: 150ms ease;
    --transition: 200ms ease;
    --transition-slow: 300ms ease;
    
    /* Border radius */
    --radius-sm: 0.375rem;
    --radius: 0.5rem;
    --radius-md: 0.75rem;
    --radius-lg: 1rem;
    --radius-xl: 1.5rem;
    --radius-full: 9999px;
}

/* Reset & Base */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background: var(--bg-secondary);
    min-height: 100vh;
}

/* Login Page */
.login-page {
    background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-container {
    width: 100%;
    max-width: 420px;
    padding: 1.5rem;
    animation: fadeIn 0.5s ease;
}

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

.login-card {
    background: var(--bg-primary);
    border-radius: var(--radius-xl);
    padding: 2.5rem;
    box-shadow: var(--shadow-xl);
    border: 1px solid var(--border-light);
}

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

.logo {
    width: 64px;
    height: 64px;
    margin: 0 auto 1rem;
    color: var(--accent);
    background: var(--accent-light);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform var(--transition);
}

.logo:hover {
    transform: scale(1.05) rotate(5deg);
}

.logo svg {
    width: 32px;
    height: 32px;
}

.brand h1 {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

.subtitle {
    color: var(--text-muted);
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

/* Login Form */
.login-form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.input-group {
    position: relative;
}

.input-group label {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 0.875rem;
    pointer-events: none;
    transition: all var(--transition-fast);
    background: var(--bg-primary);
    padding: 0 0.25rem;
}

.input-group input {
    width: 100%;
    padding: 0.875rem 1rem;
    font-size: 0.9375rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--bg-primary);
    color: var(--text-primary);
    transition: all var(--transition-fast);
}

.input-group input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-lighter);
}

.input-group input:focus + label,
.input-group input:not(:placeholder-shown) + label {
    top: 0;
    font-size: 0.75rem;
    color: var(--accent);
}

.input-group input[type="password"] {
    padding-right: 3rem;
}

.toggle-password {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity var(--transition-fast), color var(--transition-fast);
}

.input-group:hover .toggle-password,
.input-group input:focus ~ .toggle-password {
    opacity: 1;
}

.toggle-password:hover {
    color: var(--text-secondary);
}

.toggle-password svg {
    width: 18px;
    height: 18px;
}

.error-message {
    color: var(--error);
    font-size: 0.8125rem;
    text-align: center;
    min-height: 1.25rem;
    opacity: 0;
    transition: opacity var(--transition-fast);
}

.error-message.show {
    opacity: 1;
}

/* Buttons */
.btn-primary {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    padding: 1rem 1.5rem;
    font-size: 0.9375rem;
    font-weight: 600;
    color: white;
    background: var(--accent);
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-fast);
    box-shadow: var(--shadow);
}

.btn-primary:hover {
    background: var(--accent-hover);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

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

.btn-primary svg {
    width: 18px;
    height: 18px;
    transition: transform var(--transition-fast);
}

.btn-primary:hover svg {
    transform: translateX(3px);
}

.btn-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.btn-icon:hover {
    background: var(--error-bg);
    border-color: var(--error);
    color: var(--error);
}

.btn-icon svg {
    width: 18px;
    height: 18px;
}

/* Login Footer */
.login-footer {
    text-align: center;
    margin-top: 2rem;
    color: var(--text-muted);
    font-size: 0.75rem;
}

/* Dashboard Page */
.dashboard-page {
    background: var(--bg-secondary);
}

/* Top Navigation */
.top-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 64px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1.5rem;
    z-index: 100;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 600;
    font-size: 1.125rem;
    color: var(--text-primary);
}

.nav-brand svg {
    width: 28px;
    height: 28px;
    color: var(--accent);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.user-badge {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: var(--bg-tertiary);
    border-radius: var(--radius-full);
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.user-badge svg {
    width: 16px;
    height: 16px;
    color: var(--accent);
}

/* Dashboard Container */
.dashboard-container {
    padding: 6rem 1.5rem 3rem;
    max-width: 1200px;
    margin: 0 auto;
    animation: fadeIn 0.4s ease;
}

.dashboard-header {
    margin-bottom: 2rem;
}

.dashboard-header h1 {
    font-size: 1.875rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

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

/* Services Grid */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
    margin-bottom: 3rem;
}

.service-card {
    position: relative;
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    transition: all var(--transition);
    cursor: pointer;
}

.service-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: var(--radius-lg);
    padding: 1px;
    background: linear-gradient(135deg, var(--accent-light), transparent);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: opacity var(--transition);
}

.service-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    border-color: var(--accent-lighter);
}

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

.service-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.service-icon svg {
    width: 24px;
    height: 24px;
}

.service-icon.system {
    background: #e0e7ff;
    color: #6366f1;
}

.service-icon.flask {
    background: #fce7f3;
    color: #ec4899;
}

.service-icon.media {
    background: #d1fae5;
    color: #10b981;
}

.service-icon.files {
    background: #fef3c7;
    color: #f59e0b;
}

.service-icon.monitor {
    background: #ede9fe;
    color: #8b5cf6;
}

.service-icon.notes {
    background: #fee2e2;
    color: #ef4444;
}

.service-icon.ai {
    background: #ede9fe;
    color: #7c3aed;
}

.service-icon.cloud {
    background: #e0f2fe;
    color: #0284c7;
}

.service-icon.game {
    background: #fef9c3;
    color: #ca8a04;
}

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

.service-info h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.service-info p {
    font-size: 0.8125rem;
    color: var(--text-muted);
}

.service-status {
    width: 8px;
    height: 8px;
    border-radius: var(--radius-full);
    flex-shrink: 0;
    margin-top: 0.5rem;
}

.service-status.online {
    background: var(--success);
    box-shadow: 0 0 0 3px var(--success-bg);
}

.service-status.offline {
    background: var(--offline);
    box-shadow: 0 0 0 3px var(--bg-tertiary);
}

.service-status.warning {
    background: var(--warning);
    box-shadow: 0 0 0 3px var(--warning-bg);
}

.service-status.tunnel {
    background: #8b5cf6;
    box-shadow: 0 0 0 3px #ede9fe;
}

.service-link {
    position: absolute;
    top: 1rem;
    right: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    color: var(--text-muted);
    border-radius: var(--radius-sm);
    opacity: 0;
    transition: all var(--transition-fast);
}

.service-card:hover .service-link {
    opacity: 1;
}

.service-link:hover {
    background: var(--bg-tertiary);
    color: var(--accent);
}

.service-link svg {
    width: 16px;
    height: 16px;
}

/* Quick Links */
.quick-links {
    margin-bottom: 2rem;
}

.quick-links h2 {
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.links-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.quick-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1rem;
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: var(--radius-full);
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
    text-decoration: none;
    transition: all var(--transition-fast);
}

.quick-link:hover {
    background: var(--accent-light);
    border-color: var(--accent-lighter);
    color: var(--accent);
}

.quick-link svg {
    width: 16px;
    height: 16px;
}

/* Dashboard Footer */
.dashboard-footer {
    text-align: center;
    padding: 2rem 1.5rem;
    color: var(--text-muted);
    font-size: 0.8125rem;
}

/* Animations */
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Responsive */
@media (max-width: 640px) {
    .login-card {
        padding: 1.75rem;
    }
    
    .brand h1 {
        font-size: 1.5rem;
    }
    
    .top-nav {
        padding: 0 1rem;
    }
    
    .nav-brand span {
        display: none;
    }
    
    .user-badge span {
        display: none;
    }
    
    .dashboard-container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    .services-grid {
        grid-template-columns: 1fr;
    }
    
    .service-link {
        opacity: 1;
        position: static;
        width: auto;
        height: auto;
        margin-top: 0.75rem;
        padding: 0.5rem 1rem;
        background: var(--bg-tertiary);
        border-radius: var(--radius);
        color: var(--text-secondary);
    }
    
    .service-card {
        flex-direction: column;
    }
    
    .service-card > *:not(.service-icon):not(.service-link) {
        width: 100%;
    }
}

/* Loading States */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

/* Focus visible for accessibility */
input:focus-visible,
button:focus-visible,
a:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}
