:root {
    --bg-color: #f8fafc;
    --header-bg: #ffffff;
    --primary: #0f172a; 
    --accent: #00cfef; /* Cosmory Cyan */
    --text-main: #334155;
    --text-light: #64748b;
    --border: #e2e8f0;
    --dark-logo-bg: #020617;
}

body {
    margin: 0;
    font-family: 'Segoe UI', Inter, system-ui, sans-serif;
    background: var(--bg-color);
    color: var(--text-main);
    min-height: 100vh;
}

/* --- LOGO BOX --- */
.logo-box {
    background-color: var(--dark-logo-bg);
    padding: 8px 16px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.cosmory-logo-container { display: flex; align-items: center; gap: 4px; height: 40px; }
.cosmory-text { font-family: Arial, sans-serif; font-size: 24px; color: white; letter-spacing: 3px; font-weight: 300; }
.cosmory-text.bold { font-weight: 800; color: var(--accent); letter-spacing: 1px; }
.cosmory-icon-svg { width: 35px; height: 35px; overflow: visible; }

/* --- ANIMATIONS --- */
.orbit-ring-1 { animation: spin-right 6s linear infinite; transform-origin: center; }
.orbit-ring-2 { animation: spin-left 9s linear infinite; transform-origin: center; }
.orbit-ring-3 { animation: spin-right 12s linear infinite; transform-origin: center; }
@keyframes spin-right { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
@keyframes spin-left { from { transform: rotate(360deg); } to { transform: rotate(0deg); } }

.shooting-star {
    stroke-dasharray: 20, 50;
    stroke-dashoffset: 70;
    animation: shoot 4s ease-in-out infinite;
    opacity: 0;
}
@keyframes shoot {
    0% { stroke-dashoffset: 70; transform: translateX(-20px); opacity: 0; }
    10% { opacity: 0.8; }
    80% { opacity: 0.8; }
    100% { stroke-dashoffset: -70; transform: translateX(350px); opacity: 0; }
}

/* --- HEADER --- */
header {
    background: var(--header-bg);
    padding: 0.8rem 2rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border);
}

/* --- TOGGLES --- */
.nav-toggles { display: flex; gap: 5px; background: #f1f5f9; padding: 4px; border-radius: 8px; margin-right: 20px; }
.nav-toggle { padding: 6px 16px; border-radius: 6px; cursor: pointer; font-size: 0.9rem; font-weight: 600; color: var(--text-light); transition: 0.2s; }
.nav-toggle.active { background: white; color: var(--primary); box-shadow: 0 1px 2px rgba(0,0,0,0.1); }
.nav-toggle:hover:not(.active) { background: #e2e8f0; }

/* --- CONTAINER & LISTS --- */
.container { max-width: 1200px; margin: 2rem auto; padding: 0 20px; text-align: center; }
.title-section h1 { color: var(--primary); margin-bottom: 5px; }
.title-section p { color: var(--text-light); margin-top: 0; }

.app-container { background: white; border-radius: 12px; box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1); padding: 2rem; margin-top: 2rem; text-align: left; }
.list-header { display: flex; padding: 10px 20px; background: #eef2ff; border-radius: 8px; font-weight: 700; color: #475569; font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 1rem; }
.col-1 { width: 40%; } .col-2 { width: 60%; }
.app-item { display: flex; align-items: center; padding: 1.2rem 0; border-bottom: 1px solid var(--border); }
.app-item:last-child { border-bottom: none; }

.app-pill { display: flex; align-items: center; background: white; border: 1px solid var(--border); border-radius: 50px; padding: 10px 20px 10px 10px; width: 90%; box-shadow: 0 1px 2px rgba(0,0,0,0.05); cursor: pointer; transition: transform 0.1s, box-shadow 0.1s; position: relative; }
.app-pill:hover { transform: translateY(-2px); box-shadow: 0 4px 6px rgba(0,0,0,0.08); border-color: #cbd5e1; }
.app-icon { background: var(--primary); color: white; width: 35px; height: 35px; border-radius: 50%; display: flex; justify-content: center; align-items: center; font-weight: bold; font-size: 0.9rem; margin-right: 15px; }
.app-name { font-weight: 600; color: var(--primary); font-size: 1rem; }
.app-desc { padding-left: 1.5rem; border-left: 3px solid var(--accent); color: var(--text-main); font-size: 0.95rem; line-height: 1.5; }

/* --- BUTTONS --- */
.header-btn { display: flex; align-items: center; gap: 8px; background: white; border: 1px solid #e2e8f0; padding: 8px 16px; border-radius: 8px; font-weight: 600; color: #334155; cursor: pointer; transition: all 0.2s; text-decoration: none; font-size: 0.9rem; }
.header-btn:hover { background: #f8fafc; border-color: #cbd5e1; }
.header-btn.logout { background: #fef2f2; border-color: #fecaca; color: #ef4444; }

/* --- LOGIN UI --- */
.login-body { background: #f1f5f9; display: flex; justify-content: center; align-items: center; min-height: 100vh; flex-direction: column; padding: 20px; box-sizing: border-box; }
.login-card { background: white; padding: 2.5rem; border-radius: 12px; box-shadow: 0 10px 25px -5px rgba(0,0,0,0.1); width: 100%; max-width: 400px; text-align: center; border: 1px solid #e2e8f0; position: relative; }

.input-group { position: relative; margin-bottom: 15px; }
.login-input { width: 100%; padding: 12px; padding-right: 40px; border: 1px solid #cbd5e1; border-radius: 8px; box-sizing: border-box; font-size: 1rem; background: #f8fafc; }
.login-input:focus { border-color: var(--primary); outline: none; background: white; }
.toggle-password { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); cursor: pointer; color: #94a3b8; user-select: none; font-size: 1.2rem; }

.login-btn { width: 100%; padding: 12px; font-size: 1rem; background: var(--primary); color: white; border:none; border-radius:8px; cursor:pointer; transition: background 0.3s; }
.login-btn:hover { background: var(--accent); }

.remember-me-container { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; font-size: 0.9rem; }
.remember-me-container label { display: flex; align-items: center; gap: 5px; cursor: pointer; color: #64748b; }

.login-footer { margin-top: 1.5rem; font-size: 0.85rem; color: #94a3b8; border-top: 1px solid #e2e8f0; padding-top: 1rem; }
.footer-links { margin-top: 15px; display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; font-size: 0.75rem; color: #94a3b8; }
.footer-links a { color: #64748b; text-decoration: none; }
.footer-links a:hover { text-decoration: underline; color: var(--primary); }

/* --- MODALS --- */
.modal-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.5); display: none; justify-content: center; align-items: center; z-index: 1000; }
.modal-box { background: white; padding: 25px; border-radius: 12px; width: 90%; max-width: 400px; box-shadow: 0 20px 25px -5px rgba(0,0,0,0.1); }
.modal-title { margin-top: 0; color: var(--primary); }
.support-option { display: block; width: 100%; padding: 12px; margin-bottom: 10px; text-align: left; background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 6px; cursor: pointer; transition: 0.2s; }
.support-option:hover { background: #eef2ff; border-color: #cbd5e1; }
.support-form { display: none; margin-top: 15px; }
textarea.support-input { width: 100%; padding: 10px; border: 1px solid #cbd5e1; border-radius: 6px; margin-bottom: 10px; resize: vertical; min-height: 80px; box-sizing: border-box; font-family: inherit; }

/* --- CROPPER --- */
.cropper-modal-content { width: 90%; max-width: 600px; height: 80vh; display: flex; flex-direction: column; }
.cropper-container { flex: 1; background: #000; overflow: hidden; position: relative; }
#cropper-image { max-width: 100%; }
.btn-secondary { background: #64748b; color: white; padding: 8px 16px; border-radius: 6px; border: none; cursor: pointer; }

/* --- PROFILE --- */
.profile-container { max-width: 1200px; margin: 20px auto; padding: 0 20px; }
.card { background: white; border-radius: 8px; box-shadow: 0 2px 4px rgba(0,0,0,0.05); padding: 20px; margin-bottom: 30px; }
.profile-header { display: flex; gap: 30px; align-items: flex-start; }
.avatar-section { display: flex; flex-direction: column; align-items: center; min-width: 150px; }
.avatar-img { width: 120px; height: 120px; border-radius: 50%; object-fit: cover; border: 4px solid #f1f5f9; margin-bottom: 10px; }
.file-upload { color: var(--accent); font-size: 0.9rem; cursor: pointer; font-weight: 500; }
.form-section { flex: 1; display: grid; grid-template-columns: repeat(3, 1fr); gap: 15px; }
.full-row { grid-column: span 3; display: flex; justify-content: flex-end; padding-top: 10px; }
.data-table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.data-table thead { background-color: var(--primary); color: white; }
.data-table th, .data-table td { padding: 12px 15px; text-align: left; border-bottom: 1px solid #e2e8f0; }
.data-table tbody tr:nth-child(even) { background-color: #f8fafc; }
.status-success { color: #15803d; background: #dcfce7; padding: 4px 8px; border-radius: 4px; font-size: 0.8rem; }
.status-error { color: #b91c1c; background: #fee2e2; padding: 4px 8px; border-radius: 4px; font-size: 0.8rem; }

@media (max-width: 768px) {
    .profile-header { flex-direction: column; align-items: center; }
    .form-section { grid-template-columns: 1fr; width: 100%; }
}