/* Birthday Bot Dashboard Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
}

/* Login Styles */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

.login-form {
    background: white;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 400px;
    text-align: center;
}

.login-form h2 {
    margin-bottom: 30px;
    color: #333;
    font-size: 28px;
    font-weight: 600;
}

/* Dashboard Styles */
.dashboard {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

header {
    background: white;
    padding: 20px 30px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

header h1 {
    color: #333;
    font-size: 32px;
    font-weight: 700;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 20px;
}

.time-display {
    text-align: right;
    font-size: 14px;
    line-height: 1.3;
}

.server-time, .live-time {
    margin-bottom: 4px;
}

.server-time strong, .live-time strong {
    color: #555;
}

#live-clock {
    font-family: 'Courier New', Courier, monospace;
    color: #667eea;
    font-weight: bold;
}

.logout-btn {
    background: #e74c3c;
    color: white;
    padding: 10px 20px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 500;
    transition: background-color 0.3s;
}

.logout-btn:hover {
    background: #c0392b;
}

/* Grid Layout */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 30px;
}

/* Card Styles */
.card {
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s, box-shadow 0.2s;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
}

.card h2 {
    margin-bottom: 20px;
    color: #333;
    font-size: 24px;
    font-weight: 600;
    border-bottom: 3px solid #667eea;
    padding-bottom: 10px;
}

/* Form Styles */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #555;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
}

.form-group small {
    color: #666;
    font-size: 12px;
    margin-top: 5px;
    display: block;
}

/* Button Styles */
button,
.test-btn,
.save-btn {
    background: #667eea;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.2s;
}

button:hover,
.test-btn:hover,
.save-btn:hover {
    background: #5a67d8;
    transform: translateY(-1px);
}

.test-btn {
    background: #48bb78;
    padding: 8px 16px;
    font-size: 12px;
}

.test-btn:hover {
    background: #38a169;
}

.save-btn {
    width: 100%;
    padding: 16px;
    font-size: 16px;
    background: #667eea;
}

/* Birthday List Styles */
.no-birthdays {
    text-align: center;
    color: #666;
    font-size: 18px;
    padding: 40px 20px;
    font-style: italic;
}

.message-preview {
    background: #f0f9ff;
    border: 2px solid #0ea5e9;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 30px;
}

.message-preview h4 {
    margin-bottom: 15px;
    color: #0369a1;
    font-size: 16px;
}

.preview-text {
    background: white;
    padding: 15px;
    border-radius: 6px;
    border-left: 4px solid #0ea5e9;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 15px;
    line-height: 1.4;
    color: #333;
}

.test-consolidated {
    background: #0ea5e9 !important;
    font-weight: 600;
}

.test-consolidated:hover {
    background: #0284c7 !important;
}

.birthday-list {
    margin-top: 15px;
}

.birthday-list h4 {
    margin-bottom: 15px;
    color: #555;
    font-size: 16px;
    border-bottom: 1px solid #e5e5e5;
    padding-bottom: 5px;
}

.birthday-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background: #f8fafc;
    border-radius: 8px;
    border-left: 4px solid #667eea;
    margin-bottom: 15px;
}

.person-info {
    flex: 1;
}

.person-info strong {
    display: block;
    font-size: 16px;
    color: #333;
    margin-bottom: 4px;
}

.positions {
    color: #667eea;
    font-size: 14px;
    font-weight: 500;
}

/* Status Styles */
.status-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.status-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background: #f8fafc;
    border-radius: 8px;
}

.status-label {
    font-weight: 500;
    color: #555;
}

.status-value {
    font-weight: 600;
}

.status-good {
    color: #48bb78;
}

.status-error {
    color: #e74c3c;
}

/* Alert Styles */
.alert {
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-weight: 500;
}

.alert-success {
    background: #c6f6d5;
    border: 1px solid #9ae6b4;
    color: #22543d;
}

.alert-error {
    background: #fed7d7;
    border: 1px solid #feb2b2;
    color: #742a2a;
}

/* Cron Command */
.cron-command {
    display: block;
    background: #2d3748;
    color: #e2e8f0;
    padding: 15px;
    border-radius: 8px;
    font-family: 'Courier New', Courier, monospace;
    font-size: 14px;
    margin: 15px 0;
    word-break: break-all;
}

/* Error Styles */
.error {
    color: #e74c3c;
    margin-top: 10px;
    font-size: 14px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .dashboard {
        padding: 10px;
    }
    
    .dashboard-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .card {
        padding: 20px;
    }
    
    header {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }
    
    .header-actions {
        flex-direction: column;
        gap: 10px;
    }
    
    .birthday-item {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .status-grid {
        grid-template-columns: 1fr;
    }
}

/* Version 3 dashboard */
:root {
    --ink: #172033;
    --muted: #687086;
    --line: #e4e8f0;
    --primary: #5b4bc4;
    --primary-dark: #4338a4;
    --surface: #ffffff;
    --soft: #f6f7fb;
    --special: #fff8e6;
}

body {
    background: #f2f3f8;
    color: var(--ink);
}

.dashboard { max-width: 1180px; padding: 32px 20px 64px; }
header { margin-bottom: 20px; }
header h1 { font-size: 30px; }
header p { color: var(--muted); margin-top: 4px; }
.eyebrow { color: var(--primary); font-size: 12px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.summary-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 20px; }
.metric { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 20px; }
.metric strong { display: block; font-size: 28px; }
.metric span { color: var(--muted); font-size: 13px; }
.dashboard-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.card { border: 1px solid var(--line); box-shadow: 0 2px 12px rgba(23, 32, 51, .05); padding: 24px; }
.card:hover { transform: none; box-shadow: 0 4px 18px rgba(23, 32, 51, .08); }
.card.wide { grid-column: 1 / -1; }
.card h2 { border: 0; padding: 0; margin: 4px 0 18px; font-size: 22px; }
.card-heading { display: flex; align-items: start; justify-content: space-between; gap: 16px; }
.badge { border-radius: 999px; background: #ece9ff; color: var(--primary-dark); padding: 7px 11px; font-size: 12px; font-weight: 700; }
.message-block { background: #f2f7ff; border: 1px solid #dce8fa; border-left: 4px solid #4e78bc; border-radius: 8px; padding: 16px; margin-top: 12px; }
.message-block.special { background: var(--special); border-color: #f2dfaa; border-left-color: #ce9412; }
.message-block p { line-height: 1.55; margin-top: 7px; }
.message-type { color: var(--muted); font-size: 12px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.empty, .muted { color: var(--muted); line-height: 1.5; }
.status, .warning { border-radius: 7px; padding: 11px 13px; margin: 8px 0; font-size: 14px; }
.status.good { background: #eaf8ef; color: #17653a; }
.status.bad, .warning { background: #fff0f0; color: #8b2d2d; }
.compact-list > div { display: flex; align-items: center; justify-content: space-between; gap: 18px; border-top: 1px solid var(--line); padding: 12px 0; }
.compact-list > div:first-child { border-top: 0; }
.compact-list span { min-width: 0; }
.compact-list strong, .compact-list small { display: block; }
.compact-list small { color: var(--muted); margin-top: 3px; overflow-wrap: anywhere; }
.compact-list time { color: var(--muted); white-space: nowrap; font-size: 13px; }
.scroll-list { max-height: 420px; overflow: auto; padding-right: 6px; }
.special-layout { display: grid; grid-template-columns: 1.3fr 1fr; gap: 28px; }
.special-row form { margin-left: auto; }
.special-edit { display: grid; grid-template-columns: 90px 1fr auto; align-items: start; gap: 9px; border-top: 1px solid var(--line); padding: 12px 0; }
.special-edit:first-child { border-top: 0; }
.special-edit div { display: flex; gap: 6px; }
.special-edit button { padding: 9px 11px; }
.stack, .settings-grid { display: grid; gap: 14px; }
.settings-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
label { color: #41495d; display: grid; gap: 6px; font-size: 13px; font-weight: 700; }
input, textarea, select { width: 100%; padding: 11px 12px; border: 1px solid #cfd5e2; border-radius: 7px; font: inherit; background: white; }
input:focus, textarea:focus, select:focus { outline: 3px solid rgba(91, 75, 196, .13); border-color: var(--primary); }
button { background: var(--primary); }
button:hover { background: var(--primary-dark); }
button.ghost { background: transparent; padding: 6px 9px; }
button.danger { color: #a52a2a; border: 1px solid #e6bcbc; }
button.send { background: #16734a; }
.check { display: flex; align-items: center; gap: 9px; align-self: center; }
.check input { width: auto; }
.preview-form { display: flex; align-items: end; gap: 12px; }
.preview-form label { max-width: 230px; }
.preview-form button { margin-bottom: 0; }
.send-form { margin-top: 14px; }
.alert.success { background: #eaf8ef; color: #17653a; border: 1px solid #bce5ca; }
.login-form label { text-align: left; margin-bottom: 8px; }
.login-form input { margin-bottom: 14px; }

@media (max-width: 760px) {
    .summary-grid { grid-template-columns: repeat(2, 1fr); }
    .dashboard-grid { grid-template-columns: 1fr; }
    .card.wide { grid-column: auto; }
    .special-layout, .settings-grid { grid-template-columns: 1fr; }
    .special-edit { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
    header h1 {
        font-size: 24px;
    }
    
    .login-form {
        padding: 30px 20px;
    }
    
    .card {
        padding: 15px;
    }
}

/* Upcoming Birthdays */
.upcoming-birthdays {
    margin-top: 1rem;
}

.upcoming-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.upcoming-item {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 2fr;
    gap: 1rem;
    padding: 0.75rem;
    background: #f8f9fa;
    border-radius: 6px;
    border-left: 4px solid #007bff;
    align-items: center;
}

.upcoming-name {
    font-weight: 600;
    color: #2c3e50;
}

.upcoming-date {
    font-weight: 500;
    color: #007bff;
}

.upcoming-days {
    font-size: 0.9em;
    color: #6c757d;
    font-weight: 500;
}

.upcoming-teams {
    font-size: 0.9em;
    color: #495057;
    font-style: italic;
}

/* Message Preview */
.preview-form {
    margin-bottom: 1.5rem;
}

.preview-form .form-group {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.preview-form input[type="date"] {
    padding: 0.5rem;
    border: 2px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
}

.preview-result {
    margin-top: 1.5rem;
    padding: 1.5rem;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #dee2e6;
}

.preview-result h3 {
    margin: 0 0 1rem 0;
    color: #2c3e50;
    font-size: 1.25rem;
}

.message-preview {
    background: white;
    padding: 1rem;
    border-radius: 6px;
    border-left: 4px solid #28a745;
    margin-bottom: 1rem;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
    line-height: 1.5;
}

.birthday-details {
    margin-top: 1rem;
}

.birthday-details h4 {
    margin: 0 0 0.5rem 0;
    color: #495057;
    font-size: 1rem;
}

.birthday-details ul {
    margin: 0.5rem 0;
    padding-left: 1.5rem;
}

.birthday-details li {
    margin-bottom: 0.25rem;
    color: #495057;
}

.no-message {
    text-align: center;
    padding: 2rem;
    color: #6c757d;
}

/* Responsive adjustments for new components */
@media (max-width: 768px) {
    .upcoming-item {
        grid-template-columns: 1fr;
        gap: 0.5rem;
        text-align: center;
    }
    
    .preview-form .form-group {
        flex-direction: column;
        align-items: stretch;
    }
}
