/* -------------------------------------------------------
   GLOBAL RESET & BASE
------------------------------------------------------- */

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

body {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
                 Roboto, Helvetica, Arial, sans-serif;
    background: #f5f7fa;
    color: #111;
    line-height: 1.5;
}

/* -------------------------------------------------------
   APP SHELL
------------------------------------------------------- */

.app-shell {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.app-header {
    background: linear-gradient(135deg, #4f46e5, #7c3aed);
    padding: 16px 0;
    color: white;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.header-inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;

    display: flex;
    align-items: center;
    justify-content: space-between;
}

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

.brand-logo svg {
    width: 40px;
    height: 40px;
    fill: white;
}

.brand-title {
    font-size: 20px;
    font-weight: 600;
}

.brand-subtitle {
    font-size: 12px;
    opacity: 0.85;
}

.header-nav a {
    color: white;
    text-decoration: none;
    margin-left: 20px;
    font-weight: 500;
    opacity: 0.9;
}

.header-nav a:hover {
    opacity: 1;
}

.app-main {
    flex: 1;
    padding: 32px 0;
}

.main-inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

/* -------------------------------------------------------
   AUTH PAGES (login/register)
------------------------------------------------------- */

.auth-card {
    max-width: 420px;
    margin: 40px auto;
    background: white;
    border-radius: 14px;
    padding: 32px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.1);
}

.auth-title {
    font-size: 26px;
    font-weight: 600;
    margin-bottom: 6px;
}

.auth-subtitle {
    font-size: 14px;
    color: #555;
    margin-bottom: 20px;
}

.auth-error {
    background: #fee2e2;
    color: #b91c1c;
    padding: 10px 14px;
    border-radius: 8px;
    margin-bottom: 16px;
    font-size: 14px;
}

.auth-form label {
    display: block;
    margin-top: 14px;
    font-size: 14px;
    font-weight: 500;
}

.auth-form input {
    width: 100%;
    margin-top: 6px;
    padding: 10px 12px;
    border-radius: 8px;
    border: 1px solid #ccc;
    font-size: 15px;
}

.auth-btn {
    width: 100%;
    margin-top: 24px;
}

.auth-switch {
    margin-top: 20px;
    font-size: 14px;
    text-align: center;
}

.auth-switch a {
    color: #4f46e5;
    text-decoration: none;
    font-weight: 500;
}

/* -------------------------------------------------------
   BUTTONS
------------------------------------------------------- */

.btn-primary {
    background: #4f46e5;
    color: white;
    border: none;
    padding: 10px 16px;
    border-radius: 8px;
    font-size: 15px;
    cursor: pointer;
    font-weight: 500;
}

.btn-primary:hover {
    background: #4338ca;
}

.btn-ghost {
    background: #eef2ff;
    color: #4f46e5;
    border: none;
    padding: 10px 16px;
    border-radius: 8px;
    font-size: 15px;
    cursor: pointer;
    font-weight: 500;
}

.btn-ghost:hover {
    background: #e0e7ff;
}

.btn-full {
    width: 100%;
}

.btn-icon {
    margin-right: 6px;
}

/* -------------------------------------------------------
   CARD LAYOUT
------------------------------------------------------- */

.card-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 28px;
}

.card {
    background: white;
    border-radius: 14px;
    padding: 24px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.08);
}

.card-inner {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-title {
    font-size: 20px;
    font-weight: 600;
}

.card-subtitle {
    font-size: 14px;
    color: #555;
}

.card-tag {
    background: #eef2ff;
    color: #4f46e5;
    padding: 4px 10px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
}

/* -------------------------------------------------------
   CLOCK UI
------------------------------------------------------- */

.clock-layout {
    display: flex;
    gap: 20px;
    justify-content: space-between;
}

.clock-card {
    flex: 1;
    text-align: center;
}

.clock-label {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 6px;
}

.clock-helper {
    font-size: 12px;
    color: #666;
    margin-bottom: 10px;
}

/* -------------------------------------------------------
   COLOR MANAGER
------------------------------------------------------- */

.color-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.color-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px;
    border-radius: 10px;
    cursor: pointer;
}

.color-row.active {
    background: #eef2ff;
}

.color-row.inactive:hover {
    background: #f3f4f6;
}

.color-swatch {
    width: 28px;
    height: 28px;
    border-radius: 6px;
}

.color-meta {
    display: flex;
    flex-direction: column;
}

.color-name {
    font-weight: 600;
}

.color-times {
    font-size: 13px;
    color: #555;
}

/* -------------------------------------------------------
   CALENDAR
------------------------------------------------------- */

.calendar-card {
    display: flex;
    flex-direction: column;
}

.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.calendar-title {
    font-size: 20px;
    font-weight: 600;
}

.calendar-subtitle {
    font-size: 14px;
    color: #555;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 6px;
}

.calendar-day-header {
    text-align: center;
    font-size: 13px;
    font-weight: 600;
    color: #444;
}

.day {
    background: #f9fafb;
    border-radius: 10px;
    padding: 10px 0;
    text-align: center;
    cursor: pointer;
    position: relative;
    min-height: 50px;
    font-size: 14px;
}

.day:hover {
    background: #f3f4f6;
}

.day-bar {
    width: 100%;
    height: 6px;
    border-radius: 4px;
    margin-top: 4px;
}

/* -------------------------------------------------------
   FOOTER CARD
------------------------------------------------------- */

.footer-card {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.footer-actions {
    display: flex;
    gap: 12px;
}

.footer-status {
    margin-top: 14px;
    font-family: monospace;
    font-size: 13px;
    white-space: pre-wrap;
}

.footer-meta {
    margin-top: 14px;
    font-size: 14px;
    color: #555;
}

/* -------------------------------------------------------
   RESPONSIVE
------------------------------------------------------- */

@media (max-width: 900px) {
    .card-grid {
        grid-template-columns: 1fr;
    }
}
