/* ============================================================
   Blarney Stone Operations Dashboard
   Mobile-first responsive design
   ============================================================ */

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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background: #f0f2f5;
    color: #333;
    min-height: 100vh;
}

/* ---- HEADER ---- */

header {
    background: #1a1a2e;
    color: white;
    padding: 12px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-left h1 {
    font-size: 18px;
    font-weight: 600;
}

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

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

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.15s, transform 0.1s;
    text-decoration: none;
}

.btn:active {
    transform: scale(0.97);
}

.btn-logout {
    background: rgba(255,255,255,0.15);
    color: white;
}

.btn-logout:hover {
    background: rgba(255,255,255,0.25);
}

.btn-send {
    background: #1565C0;
    color: white;
    padding: 10px 24px;
    font-size: 15px;
    font-weight: 600;
}

.btn-send:hover {
    background: #0d47a1;
}

.btn-select-all {
    background: #e0e0e0;
    color: #555;
    font-size: 13px;
    padding: 6px 12px;
}

.btn-select-all:hover {
    background: #d0d0d0;
}

.btn-primary {
    background: #1565C0;
    color: white;
    padding: 10px 32px;
    font-size: 15px;
}

.btn-primary:hover {
    background: #0d47a1;
}

/* ---- MAIN / GRID ---- */

main {
    padding: 20px;
    max-width: 900px;
    margin: 0 auto;
}

.actions-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}

@media (min-width: 700px) {
    .actions-grid {
        grid-template-columns: 1fr 1fr;
    }
}

/* ---- ACTION CARDS ---- */

.action-card {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.card-header {
    padding: 16px 20px;
    color: white;
}

.card-header h2 {
    font-size: 17px;
    font-weight: 600;
    margin-bottom: 2px;
}

.card-header p {
    font-size: 13px;
    opacity: 0.85;
}

.cig-header {
    background: #e65100;
}

.liquor-header {
    background: #6a1b9a;
}

.sales-header {
    background: #1565C0;
}

.slow-header {
    background: #2e7d32;
}

.card-body {
    padding: 16px 20px 20px;
}

/* ---- STORE PICKER ---- */

.store-picker {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}

.store-checkbox {
    cursor: pointer;
}

.store-checkbox input {
    display: none;
}

.store-chip {
    display: inline-block;
    padding: 8px 14px;
    border-radius: 20px;
    border: 2px solid #ddd;
    font-size: 13px;
    font-weight: 500;
    color: #555;
    transition: all 0.15s;
    user-select: none;
    -webkit-user-select: none;
}

.store-checkbox input:checked + .store-chip {
    background: #1565C0;
    border-color: #1565C0;
    color: white;
}

.store-chip:hover {
    border-color: #1565C0;
}

/* ---- DATE PICKER ---- */

.date-picker {
    margin-bottom: 16px;
}

.date-picker label {
    display: block;
    font-size: 13px;
    color: #777;
    margin-bottom: 6px;
}

.date-input {
    width: 100%;
    padding: 10px 12px;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    background: white;
    color: #333;
}

.date-input:focus {
    border-color: #1565C0;
    outline: none;
}

/* ---- DAY PICKER ---- */

.day-picker {
    margin-bottom: 16px;
}

.day-picker label {
    display: block;
    font-size: 13px;
    color: #777;
    margin-bottom: 6px;
}

.day-picker select {
    width: 100%;
    padding: 10px 12px;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    background: white;
    color: #333;
    -webkit-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23888' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
}

.day-picker select:focus {
    border-color: #1565C0;
    outline: none;
}

/* ---- CARD ACTIONS ---- */

.card-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

/* ---- MODAL ---- */

.modal {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 200;
    padding: 20px;
}

.modal-content {
    background: white;
    border-radius: 12px;
    width: 100%;
    max-width: 600px;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.modal-header {
    padding: 16px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid #eee;
}

.modal-header h3 {
    font-size: 16px;
    font-weight: 600;
}

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    color: #999;
    cursor: pointer;
    padding: 0 4px;
    line-height: 1;
}

.modal-close:hover {
    color: #333;
}

.task-output {
    flex: 1;
    overflow-y: auto;
    padding: 16px 20px;
    font-family: "SF Mono", "Cascadia Code", "Consolas", monospace;
    font-size: 12px;
    line-height: 1.6;
    background: #1a1a2e;
    color: #ccc;
    min-height: 200px;
}

.output-line {
    white-space: pre-wrap;
    word-break: break-word;
}

.output-info {
    color: #64b5f6;
}

.output-success {
    color: #81c784;
    font-weight: bold;
}

.output-error {
    color: #ef5350;
    font-weight: bold;
}

.modal-footer {
    padding: 12px 20px;
    display: flex;
    justify-content: flex-end;
    border-top: 1px solid #eee;
}

/* ---- TOAST ---- */

.toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    color: white;
    z-index: 300;
    animation: slideUp 0.3s ease;
    max-width: 90%;
    text-align: center;
}

.toast-success {
    background: #2e7d32;
}

.toast-error {
    background: #c62828;
}

@keyframes slideUp {
    from { opacity: 0; transform: translateX(-50%) translateY(20px); }
    to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* ---- LOGIN ---- */

.login-body {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: #1a1a2e;
}

.login-card {
    background: white;
    padding: 40px 32px;
    border-radius: 12px;
    text-align: center;
    width: 100%;
    max-width: 360px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.2);
}

.login-card h1 {
    font-size: 22px;
    color: #1a1a2e;
    margin-bottom: 4px;
}

.login-card h2 {
    font-size: 14px;
    color: #888;
    font-weight: 400;
    margin-bottom: 24px;
}

.login-card input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
    margin-bottom: 16px;
    text-align: center;
}

.login-card input:focus {
    border-color: #1565C0;
    outline: none;
}

.login-card button {
    width: 100%;
    padding: 12px;
    background: #1565C0;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
}

.login-card button:hover {
    background: #0d47a1;
}

.alert {
    padding: 10px 16px;
    border-radius: 6px;
    margin-bottom: 16px;
    font-size: 14px;
}

.alert.error {
    background: #ffebee;
    color: #c62828;
}
