:root {
    --bg-color: #f1f5f9;
    --card-bg: #ffffff;
    --text-main: #0f172a;
    --text-muted: #64748b;
    --primary: #4f46e5;
    --primary-hover: #4338ca;
    --border: #e2e8f0;
    --cell-bg: #f8fafc;
    --cell-hover: #f1f5f9;
    --danger: #ef4444;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Inter', sans-serif;
}

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    min-height: 100vh;
}

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

/* Header */
.app-header {
    background-color: var(--card-bg);
    border-bottom: 1px solid var(--border);
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 10;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary);
}

.header-actions {
    display: flex;
    gap: 1rem;
}

.btn {
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
    font-weight: 500;
    font-size: 0.875rem;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
}

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

.btn-primary:hover {
    background-color: var(--primary-hover);
}

.btn-secondary {
    background-color: white;
    border: 1px solid var(--border);
    color: var(--text-main);
}

.btn-secondary:hover {
    background-color: var(--bg-color);
}

/* Main Content */
.main-content {
    padding: 2rem;
    display: flex;
    justify-content: center;
}

.planner-wrapper {
    background-color: var(--card-bg);
    width: 100%;
    max-width: 1400px;
    padding: 2rem;
    border-radius: 0.5rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

/* Document Header */
.doc-header {
    margin-bottom: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.doc-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-main);
    width: 300px;
}

.doc-meta {
    font-size: 0.875rem;
    color: var(--text-muted);
}

/* Hidden Inputs */
.hidden-input, .hidden-input-inline {
    background: transparent;
    border: 1px solid transparent;
    color: var(--text-main);
    font-family: inherit;
    outline: none;
    transition: border-color 0.2s;
    padding: 0.25rem;
    border-radius: 0.25rem;
}

.hidden-input:hover, .hidden-input:focus, .hidden-input-inline:hover, .hidden-input-inline:focus {
    border-color: var(--border);
    background: var(--cell-bg);
}

/* Table */
.table-responsive {
    overflow-x: auto;
}

.shift-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 1000px;
}

.shift-table th, .shift-table td {
    border: 1px solid var(--border);
    padding: 0.75rem;
    text-align: center;
    vertical-align: middle;
}

.shift-table th {
    background-color: var(--cell-bg);
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--text-muted);
}

.col-employee { width: 15%; text-align: left !important; }
.col-total { width: 8%; font-weight: 700; background-color: var(--cell-bg); }
.col-action { width: 4%; border: none !important; background: transparent !important; }

/* Time inputs layout */
.time-slot {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    align-items: center;
}

.time-input-group {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.time-input-group input[type="time"] {
    border: 1px solid var(--border);
    border-radius: 0.25rem;
    padding: 0.1rem;
    font-size: 0.75rem;
    color: var(--text-main);
    outline: none;
    width: 80px;
}

.time-input-group input[type="time"]:focus {
    border-color: var(--primary);
}

.day-total {
    font-size: 0.75rem;
    color: var(--primary);
    font-weight: 600;
    margin-top: 0.25rem;
}

.employee-name-input {
    width: 100%;
    font-weight: 500;
}

.text-right {
    text-align: right !important;
    padding-right: 1rem !important;
}

.btn-delete {
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 0.25rem;
}

.btn-delete:hover {
    color: var(--danger);
    background: #fee2e2;
}

/* PDF Export styles */
@media print {
    body { background: white; }
    .app-header, .hide-in-pdf { display: none !important; }
    .main-content { padding: 0; }
    .planner-wrapper { box-shadow: none; padding: 0; }
    .hidden-input, .hidden-input-inline { border: none !important; background: transparent !important; }
    .time-input-group input[type="time"] { border: none; background: transparent; padding: 0; appearance: none; -webkit-appearance: none; }
    .time-input-group span { display: none; } /* hide the "to" word if it looks bad, but leaving it is fine */
}
