/* UNIAT Projects Portal - Professional Stylesheet 2025 */

/* === RESET & BASE === */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Primary palette - refined blue */
    --primary: #3b82f6;
    --primary-dark: #2563eb;
    --primary-light: #60a5fa;
    --primary-soft: rgba(59, 130, 246, 0.08);
    
    /* Secondary & semantic colors */
    --secondary: #64748b;
    --success: #22c55e;
    --danger: #ef4444;
    --warning: #f59e0b;
    
    /* Surfaces - clean whites with subtle warmth */
    --bg: #f8fafc;
    --bg-elevated: #ffffff;
    --surface: #ffffff;
    --surface-hover: #f1f5f9;
    
    /* Borders - softer, more subtle */
    --border: #e2e8f0;
    --border-light: #f1f5f9;
    --border-strong: #cbd5e1;
    
    /* Text hierarchy */
    --text: #0f172a;
    --text-secondary: #475569;
    --text-muted: #94a3b8;
    --text-light: #64748b;
    
    /* Shadows - more refined, layered */
    --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.04);
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -1px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -2px rgba(0, 0, 0, 0.04);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.08), 0 10px 10px -5px rgba(0, 0, 0, 0.03);
    --shadow-card: 0 1px 3px rgba(0, 0, 0, 0.05), 0 1px 2px rgba(0, 0, 0, 0.03);
    --shadow-card-hover: 0 10px 40px rgba(0, 0, 0, 0.08), 0 4px 12px rgba(0, 0, 0, 0.05);
    
    /* Border radius - consistent rounding */
    --radius-sm: 6px;
    --radius: 8px;
    --radius-md: 10px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    
    /* Transitions */
    --transition-fast: 150ms ease;
    --transition: 200ms ease;
    --transition-slow: 300ms ease;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.5;
    color: var(--text);
    background: var(--bg);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* === TYPOGRAPHY === */
h1, h2, h3, h4 {
    font-weight: 600;
    color: var(--text);
    margin-bottom: 0;
    letter-spacing: -0.01em;
    line-height: 1.3;
}

h1 {
    font-size: 1.75rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}
h2 {
    font-size: 1.25rem;
    font-weight: 600;
}
h3 {
    font-size: 1rem;
    font-weight: 600;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--primary-dark);
}

/* === LAYOUT === */
.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 2rem;
}

header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    padding: 0;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1.5rem;
    padding: 1rem 0;
    min-height: 64px;
}

.header-brand {
    display: flex;
    align-items: center;
    gap: 0.875rem;
}

.header-brand img {
    height: 36px;
    width: auto;
}

.header-brand h1 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text);
    letter-spacing: -0.01em;
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 0.875rem;
}

.user-menu > span {
    font-size: 0.875rem;
    color: var(--text-secondary);
    font-weight: 500;
}

main {
    flex: 1;
    padding: 2rem 0 3rem;
}

footer {
    background: var(--surface);
    border-top: 1px solid var(--border-light);
    padding: 1.5rem 0;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.8125rem;
    margin-top: auto;
}

/* === BUTTONS === */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--transition-fast);
    text-align: center;
    white-space: nowrap;
}

.btn:hover {
    background: var(--surface-hover);
    border-color: var(--border-strong);
    color: var(--text);
}

.btn-primary {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    font-weight: 500;
}

.btn-primary:hover {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.25);
}

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

.btn-danger:hover {
    background: #dc2626;
    transform: translateY(-1px);
}

.btn-logout {
    background: transparent;
    color: var(--text-secondary);
    border-color: var(--border);
}

.btn-logout:hover {
    background: var(--surface-hover);
    color: var(--danger);
    border-color: var(--danger);
}

.btn-admin {
    background: transparent;
    color: #7c3aed;
    border-color: #c4b5fd;
}

.btn-admin:hover {
    background: #f5f3ff;
    border-color: #7c3aed;
}

.btn-block {
    display: flex;
    width: 100%;
}

.btn-sm {
    padding: 0.375rem 0.75rem;
    font-size: 0.8125rem;
    border-radius: var(--radius-sm);
}

.btn-launch {
    background: var(--primary);
    color: white;
    border: none;
    font-weight: 500;
    padding: 0.625rem 1.25rem;
    border-radius: var(--radius);
}

.btn-launch:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

/* === PROJECTS GRID === */
.projects-section {
    margin-top: 1.5rem;
}

/* Header with toggle */
.projects-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
}

.projects-header h2 {
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-muted);
    margin: 0;
}

/* Toggle for showing descriptions */
.toggle-descriptions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.toggle-descriptions input[type="checkbox"] {
    display: none;
}

.toggle-btn {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.375rem 0.75rem;
    border-radius: 999px;
    background: var(--surface);
    border: 1px solid var(--border);
    font-size: 0.6875rem;
    font-weight: 500;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
}

.toggle-btn:hover {
    background: var(--surface-hover);
    color: var(--text-secondary);
}

.toggle-btn .eye-icon {
    width: 16px;
    height: 16px;
    transition: transform 0.2s ease;
}

/* Show open eye by default, hide closed */
.toggle-btn .eye-open { display: block; }
.toggle-btn .eye-closed { display: none; }

/* When checked, style the toggle differently */
.toggle-descriptions input:checked + .toggle-btn {
    background: var(--primary-soft);
    border-color: var(--primary-light);
    color: var(--primary);
}

/* Swap icons when checked */
.toggle-descriptions input:checked + .toggle-btn .eye-open { display: none; }
.toggle-descriptions input:checked + .toggle-btn .eye-closed { display: block; }

/* App launcher grid - 5 columns on desktop */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 1.5rem 1.25rem;
    padding: 0;
    max-width: 100%;
}

/* App tile with lift on hover */
.project-card {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: 1.25rem 1rem 1rem;
    border-radius: 20px;
    background: var(--surface);
    border: 1px solid rgba(226, 232, 240, 0.5);
    box-shadow:
        0 2px 8px rgba(15, 23, 42, 0.04),
        0 4px 16px rgba(15, 23, 42, 0.03);
    text-decoration: none;
    color: inherit;
    cursor: pointer;
    transform: scale(0.98);
    z-index: 1;
    transition:
        box-shadow 0.22s cubic-bezier(0.23, 0.86, 0.32, 1),
        transform 0.22s cubic-bezier(0.23, 0.86, 0.32, 1),
        background-color 0.18s ease,
        border-color 0.18s ease,
        z-index 0s;
}

/* Hover: lift & scale */
.project-card:hover {
    box-shadow:
        0 16px 40px rgba(15, 23, 42, 0.12),
        0 8px 20px rgba(15, 23, 42, 0.06);
    transform: scale(1.04) translateY(-4px);
    background-color: var(--surface);
    border-color: rgba(203, 213, 225, 0.7);
    z-index: 20;
}

/* Large centered icon (80px - blue gradient with gloss) */
.project-icon {
    position: relative;
    width: 80px;
    height: 80px;
    border-radius: 20px;
    background: linear-gradient(145deg, #4da0ff 0%, #0066ff 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 1.75rem;
    letter-spacing: -0.02em;
    margin-bottom: 0.875rem;
    flex-shrink: 0;
    overflow: hidden;
    box-shadow:
        0 6px 16px rgba(0, 102, 255, 0.25),
        inset 0 0 0 0.5px rgba(255, 255, 255, 0.3);
    transition:
        transform 0.22s cubic-bezier(0.23, 0.86, 0.32, 1),
        box-shadow 0.22s ease;
}

/* Inner gloss/specular highlight (Apple style) */
.project-icon::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(
        145deg,
        rgba(255, 255, 255, 0.35) 0%,
        rgba(255, 255, 255, 0.08) 35%,
        rgba(0, 0, 0, 0) 55%
    );
    pointer-events: none;
    z-index: 2; /* Above image for gloss effect */
}

/* Subtle bottom vignette for depth */
.project-icon::after {
    content: "";
    position: absolute;
    inset: 40% 0 0 0;
    background: linear-gradient(
        to bottom,
        rgba(0, 0, 0, 0) 0%,
        rgba(0, 0, 0, 0.15) 100%
    );
    pointer-events: none;
    z-index: 3; /* Above gloss for vignette effect */
}

/* Custom icon image (uploaded) */
.project-icon img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: inherit;
    z-index: 1; /* Below pseudo-elements */
}

/* Hide initials text when image is present */
.project-icon.has-image {
    color: transparent;
    font-size: 0;
}

/* Icon scales slightly more on hover */
.project-card:hover .project-icon {
    transform: scale(1.06);
    box-shadow:
        0 10px 25px rgba(0, 102, 255, 0.35),
        inset 0 0 0 0.5px rgba(255, 255, 255, 0.5);
}

/* App name centered below icon */
.project-name {
    text-align: center;
    font-size: 0.8125rem;
    line-height: 1.35;
    color: var(--text);
    font-weight: 500;
    max-width: 100%;
    word-wrap: break-word;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Description - shown uniformly when toggle is ON */
.project-description {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    font-size: 0.6875rem;
    line-height: 1.45;
    color: var(--text-secondary);
    text-align: center;
    margin-top: 0;
    padding: 0 0.25rem;
    transition:
        max-height 0.3s ease,
        opacity 0.25s ease,
        margin-top 0.3s ease;
}

/* When toggle is checked (using :has selector) */
.projects-section:has(#show-descriptions:checked) .project-description {
    max-height: 48px;
    opacity: 1;
    margin-top: 0.5rem;
}

/* Info button on card - shows glass overlay */
.project-info-btn {
    position: absolute;
    top: 8px;
    left: 8px;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: white;
    border: 1px solid rgba(226, 232, 240, 0.8);
    color: var(--text-secondary);
    cursor: pointer;
    opacity: 0;
    transform: scale(0.85);
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 15;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.project-info-btn svg {
    width: 14px;
    height: 14px;
}

.project-card:hover .project-info-btn {
    opacity: 1;
    transform: scale(1);
}

.project-info-btn:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    transform: scale(1.15);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

/* Glass overlay for showing full info */
.project-info-overlay {
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1rem 0.75rem;
    gap: 0.5rem;
    opacity: 0;
    visibility: hidden;
    transition: all 0.22s ease;
    z-index: 25;
}

/* Show overlay when hovering info button */
.project-info-btn:hover ~ .project-info-overlay,
.project-info-overlay:hover {
    opacity: 1;
    visibility: visible;
}

.project-info-overlay .overlay-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text);
    margin: 0;
    text-align: center;
    line-height: 1.3;
}

.project-info-overlay .overlay-description {
    font-size: 0.75rem;
    line-height: 1.5;
    color: var(--text-secondary);
    text-align: center;
    margin: 0;
    max-height: 72px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
}

/* "Open" button at top-right corner */
.btn-launch {
    position: absolute;
    top: 8px;
    right: 8px;
    padding: 5px 10px;
    border-radius: 999px;
    border: none;
    font-size: 0.625rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    background: rgba(15, 23, 42, 0.85);
    color: white;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.3);
    opacity: 0;
    transform: translateY(-4px);
    transition:
        opacity 0.2s ease,
        transform 0.2s ease,
        background-color 0.15s ease;
    z-index: 10;
}

.project-card:hover .btn-launch {
    opacity: 1;
    transform: translateY(0);
}

.btn-launch:hover {
    background: var(--primary);
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

/* Keyboard focus states */
.project-card:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 3px;
}

/* Empty state */
.empty-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 4rem 2rem;
    background: var(--surface);
    border: 1px dashed var(--border);
    border-radius: var(--radius-lg);
    color: var(--text-muted);
}

.empty-state p {
    font-size: 0.9375rem;
}

/* === AUTH PAGES (CLEAN PROFESSIONAL DESIGN) === */
.login-body {
    margin: 0;
    padding: 0;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
}

.login-container {
    width: 100%;
    max-width: 420px;
    padding: 20px;
}

.login-card {
    background: white;
    border-radius: 12px;
    padding: 48px 40px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

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

.login-logo img.logo {
    max-width: 200px;
    height: auto;
    display: block;
    margin: 0 auto;
}

.login-logo .logo-text {
    font-size: 48px;
    font-weight: 700;
    color: #2563eb;
    letter-spacing: -1px;
}

.login-title {
    margin: 0;
    font-size: 28px;
    font-weight: 600;
    color: #1a202c;
    text-align: center;
    margin-bottom: 8px;
}

.login-subtitle {
    margin: 0;
    font-size: 15px;
    color: #718096;
    text-align: center;
    margin-bottom: 32px;
    font-weight: 400;
}

.alert-error {
    background: #fff5f5;
    border: 1px solid #fc8181;
    color: #c53030;
    padding: 14px 16px;
    border-radius: 8px;
    margin-bottom: 24px;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.alert-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.login-form {
    margin-bottom: 24px;
}

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

.form-field label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 8px;
}

.form-field input {
    width: 100%;
    padding: 13px 16px;
    font-size: 15px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    transition: all 0.2s;
    box-sizing: border-box;
    font-family: inherit;
}

.form-field input:focus {
    outline: none;
    border-color: #3182ce;
    box-shadow: 0 0 0 3px rgba(49, 130, 206, 0.1);
}

.form-field input::placeholder {
    color: #a0aec0;
}

.btn-login {
    width: 100%;
    padding: 14px 20px;
    background: #3182ce;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
}

.btn-login:hover {
    background: #2c5282;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(49, 130, 206, 0.4);
}

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

.login-footer {
    text-align: center;
    padding-top: 24px;
    border-top: 1px solid #e2e8f0;
}

.login-footer p {
    margin: 0;
    font-size: 13px;
    color: #718096;
    line-height: 1.6;
}

.page-footer {
    text-align: center;
    margin-top: 24px;
}

.page-footer p {
    margin: 0;
    font-size: 13px;
    color: #a0aec0;
}

/* Legacy auth page support */
.auth-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
}

.auth-container {
    width: 100%;
    max-width: 420px;
    padding: 1.5rem;
}

.auth-box {
    background: var(--surface);
    border-radius: 1rem;
    padding: 2.5rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

.auth-box h1 {
    font-size: 1.5rem;
    text-align: center;
    margin-bottom: 0.5rem;
    color: var(--text);
}

.auth-box h2 {
    text-align: center;
    font-size: 1.25rem;
    margin-bottom: 2rem;
    color: var(--text-light);
}

.auth-footer {
    margin-top: 1.5rem;
    text-align: center;
    font-size: 0.875rem;
    color: var(--text-light);
}

.invite-info {
    background: var(--bg);
    padding: 1rem;
    border-radius: 0.5rem;
    margin-bottom: 1.5rem;
    font-size: 0.875rem;
}

/* === FORMS === */
.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text);
    font-size: 0.875rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    font-size: 0.875rem;
    transition: all 0.2s;
    background: var(--surface);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-group small {
    display: block;
    margin-top: 0.25rem;
    color: var(--text-light);
    font-size: 0.75rem;
}

.form-inline {
    background: var(--surface);
    padding: 1.5rem;
    border-radius: 0.75rem;
    border: 1px solid var(--border);
}

.form-row {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    align-items: center;
}

.form-row input,
.form-row select {
    flex: 1;
    min-width: 200px;
}

/* === ALERTS === */
.alert {
    padding: 1rem;
    border-radius: 0.5rem;
    margin-bottom: 1.5rem;
    border: 1px solid transparent;
}

.alert-success {
    background: #d1fae5;
    border-color: var(--success);
    color: #065f46;
}

.alert-error {
    background: #fee2e2;
    border-color: var(--danger);
    color: #991b1b;
}

.alert-info {
    background: #dbeafe;
    border-color: var(--primary);
    color: #1e40af;
}

.alert-warning {
    background: #fef3c7;
    border-color: var(--warning);
    color: #92400e;
}

/* === ADMIN PANEL === */
.admin-nav {
    display: flex;
    gap: 0.25rem;
    margin-bottom: 2rem;
    background: var(--surface);
    padding: 0.375rem;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    flex-wrap: wrap;
}

.admin-nav a {
    padding: 0.625rem 1.25rem;
    border-radius: var(--radius);
    font-size: 0.875rem;
    font-weight: 500;
    transition: all var(--transition-fast);
    color: var(--text-muted);
}

.admin-nav a:hover {
    background: var(--surface-hover);
    color: var(--text);
}

.admin-nav a.active {
    background: var(--primary);
    color: white;
    box-shadow: 0 1px 3px rgba(59, 130, 246, 0.3);
}

.admin-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: var(--surface);
    padding: 1.5rem;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
}

.stat-card h3 {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    font-weight: 600;
    margin: 0;
}

.stat-number {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text);
    line-height: 1;
}

.admin-section {
    background: var(--surface);
    padding: 1.5rem;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    margin-bottom: 1.5rem;
}

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

/* === TABLES === */
.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

.data-table thead {
    background: var(--bg);
}

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

.data-table td {
    padding: 0.875rem 1rem;
    border-bottom: 1px solid var(--border-light);
    color: var(--text-secondary);
}

.data-table tbody tr {
    transition: background var(--transition-fast);
}

.data-table tbody tr:hover {
    background: var(--surface-hover);
}

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

.data-table code {
    background: var(--bg);
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius-sm);
    font-family: 'SF Mono', 'Monaco', 'Courier New', monospace;
    font-size: 0.8125rem;
    color: var(--text);
}

/* === BADGES === */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.625rem;
    border-radius: 9999px;
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.badge-success {
    background: #dcfce7;
    color: #166534;
}

.badge-danger {
    background: #fee2e2;
    color: #991b1b;
}

.badge-warning {
    background: #fef3c7;
    color: #92400e;
}

.badge-info {
    background: #dbeafe;
    color: #1e40af;
}

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

/* === RESPONSIVE - App Launcher Grid Breakpoints === */

/* Desktop: 4 columns */
@media (max-width: 1279px) {
    .projects-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 1.25rem;
    }
}

/* Tablet: 3 columns */
@media (max-width: 1023px) {
    .projects-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 1rem;
    }
    
    .project-icon {
        width: 56px;
        height: 56px;
        font-size: 1.25rem;
        border-radius: 14px;
    }
}

/* Mobile: 3 columns (compact) */
@media (max-width: 767px) {
    .container {
        padding: 0 1rem;
    }
    
    .header-content {
        gap: 1rem;
    }
    
    .header-brand h1 {
        font-size: 1rem;
    }
    
    .user-menu {
        gap: 0.5rem;
    }
    
    .user-menu > span {
        display: none;
    }
    
    .projects-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 0.75rem;
    }
    
    .project-card {
        padding: 0.875rem 0.5rem 0.75rem;
    }
    
    .project-icon {
        width: 48px;
        height: 48px;
        font-size: 1.125rem;
        border-radius: 12px;
        margin-bottom: 0.5rem;
    }
    
    .project-name {
        font-size: 0.6875rem;
        -webkit-line-clamp: 2;
    }
    
    .btn-launch {
        padding: 3px 6px;
        font-size: 0.5rem;
        top: 4px;
        right: 4px;
    }
    
    .admin-stats {
        grid-template-columns: 1fr;
    }
    
    .form-row {
        flex-direction: column;
    }
    
    .form-row input,
    .form-row select {
        width: 100%;
    }
    
    .data-table {
        font-size: 0.8125rem;
    }
    
    .data-table th,
    .data-table td {
        padding: 0.625rem 0.75rem;
    }
    
    .admin-nav {
        flex-direction: column;
    }
    
    .admin-nav a {
        text-align: center;
    }
}

/* Small mobile: 2 columns */
@media (max-width: 480px) {
    .container {
        padding: 0 0.75rem;
    }
    
    main {
        padding: 1.25rem 0 2rem;
    }
    
    .projects-section > h2 {
        font-size: 0.625rem;
        margin-bottom: 1rem;
    }
    
    .projects-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.625rem;
    }
    
    .project-card {
        padding: 0.75rem 0.375rem 0.625rem;
    }
    
    .project-icon {
        width: 40px;
        height: 40px;
        font-size: 1rem;
        border-radius: 10px;
    }
    
    .project-name {
        font-size: 0.625rem;
    }
}

/* === UTILITIES === */
.text-center {
    text-align: center;
}

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

/* === PAGE SPECIFIC === */
.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.page-header h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text);
    margin: 0;
}