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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #e0f7fa 0%, #b2ebf2 100%);
    color: #263238;
    line-height: 1.6;
    min-height: 100vh;
}

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

.login-box {
    background: white;
    border-radius: 20px;
    padding: 40px 30px;
    max-width: 400px;
    width: 100%;
    box-shadow: 0 10px 40px rgba(0,0,0,0.15);
}

.login-box h1 {
    font-size: 24px;
    margin-bottom: 8px;
    text-align: center;
    color: #00838f;
}

.subtitle {
    text-align: center;
    color: #546e7a;
    font-size: 14px;
    margin-bottom: 30px;
}

.hint {
    text-align: center;
    color: #78909c;
    font-size: 12px;
    margin-top: 20px;
}

/* === Alerts === */
.alert {
    padding: 12px 16px;
    border-radius: 10px;
    margin-bottom: 20px;
    font-size: 14px;
}

.alert-error {
    background: #ffebee;
    color: #c62828;
    border: 1px solid #ef9a9a;
}

.alert-success {
    background: #e8f5e9;
    color: #2e7d32;
    border: 1px solid #a5d6a7;
}

/* === Forms === */
.form-group {
    margin-bottom: 18px;
}

.form-group label {
    display: block;
    font-size: 13px;
    color: #546e7a;
    margin-bottom: 6px;
    font-weight: 500;
}

input[type="text"],
input[type="password"],
input[type="tel"],
textarea {
    width: 100%;
    padding: 12px 14px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 15px;
    transition: all 0.2s;
}

input:focus,
textarea:focus {
    outline: none;
    border-color: #00acc1;
    box-shadow: 0 0 0 3px rgba(0,172,193,0.1);
}

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

/* === Buttons === */
button,
.btn-primary,
.btn-secondary,
.btn-danger,
.btn-logout {
    padding: 12px 20px;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.btn-primary {
    background: linear-gradient(135deg, #00acc1 0%, #00838f 100%);
    color: white;
    width: 100%;
    box-shadow: 0 4px 12px rgba(0,172,193,0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0,172,193,0.4);
}

.btn-secondary {
    background: #f5f5f5;
    color: #546e7a;
    border: 2px solid #e0e0e0;
}

.btn-secondary:hover {
    background: #eeeeee;
}

.btn-danger {
    background: linear-gradient(135deg, #e53935 0%, #c62828 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(229,57,53,0.3);
}

.btn-danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(229,57,53,0.4);
}

.btn-large {
    padding: 18px;
    font-size: 17px;
    margin-bottom: 12px;
    width: 100%;
}

.btn-logout {
    background: white;
    color: #546e7a;
    border: 2px solid #e0e0e0;
    margin-top: 20px;
    width: 100%;
    font-size: 14px;
    padding: 10px;
}

.btn-logout:hover {
    border-color: #00acc1;
    color: #00838f;
}

/* === Topbar === */
.topbar {
    background: linear-gradient(135deg, #00838f 0%, #006064 100%);
    color: white;
    padding: 20px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.1);
}

.store-info h2 {
    font-size: 18px;
    font-weight: 500;
    margin-bottom: 4px;
}

.store-info p {
    font-size: 13px;
    opacity: 0.9;
}

/* === Container === */
.container {
    max-width: 640px;
    margin: 0 auto;
    padding: 20px;
}

.header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.header-row h3 {
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #546e7a;
}

.btn-add {
    background: #e0f7fa;
    color: #00838f;
    padding: 8px 16px;
    border: none;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0,131,143,0.2);
}

.btn-add:hover {
    background: #b2ebf2;
}

/* === Guard Cards === */
.guard-card {
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 16px;
    padding: 16px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 14px;
    transition: all 0.2s;
}

.guard-card:hover {
    border-color: #00acc1;
    box-shadow: 0 4px 16px rgba(0,172,193,0.15);
}

.guard-card.active-shift {
    border-color: #26a69a;
    background: linear-gradient(135deg, #e0f2f1 0%, #b2dfdb 100%);
}

.guard-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, #00acc1 0%, #00838f 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 600;
    flex-shrink: 0;
}

.guard-card.active-shift .guard-avatar {
    background: linear-gradient(135deg, #26a69a 0%, #00897b 100%);
}

.guard-info {
    flex: 1;
}

.guard-name {
    font-size: 15px;
    font-weight: 500;
    margin-bottom: 2px;
    color: #263238;
}

.guard-status {
    font-size: 12px;
    color: #78909c;
}

.guard-card.active-shift .guard-status {
    color: #00695c;
    font-weight: 500;
}

.guard-actions {
    display: flex;
    gap: 8px;
}

.btn-icon {
    width: 36px;
    height: 36px;
    border: 2px solid #e0e0e0;
    background: white;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 16px;
    text-decoration: none;
    color: #546e7a;
    transition: all 0.2s;
}

.btn-icon:hover {
    background: #f5f5f5;
    border-color: #00acc1;
}

.btn-delete {
    border-color: #ef9a9a;
    background: #ffebee;
    color: #c62828;
}

.btn-delete:hover {
    background: #ffcdd2;
}

/* === Shift Status === */
.shift-status {
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
}

.shift-status.active {
    border-color: #26a69a;
    background: linear-gradient(135deg, #e0f2f1 0%, #b2dfdb 100%);
}

.status-badge {
    display: inline-block;
    background: linear-gradient(135deg, #26a69a 0%, #00897b 100%);
    color: white;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 10px;
    box-shadow: 0 2px 8px rgba(38,166,154,0.3);
}

.shift-status p {
    font-size: 15px;
    color: #37474f;
    font-weight: 500;
}

/* === Shift Card === */
.shift-card {
    background: white;
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 16px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.1);
}

.hint-text {
    color: #78909c;
    font-size: 14px;
    margin-bottom: 16px;
}

/* === Step Section === */
.step-section {
    background: white;
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 16px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
    border: 2px solid #e0e0e0;
}

.step-section.completed {
    opacity: 0.7;
    border-color: #a5d6a7;
}

.step-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 18px;
    padding-bottom: 14px;
    border-bottom: 2px solid #e0f7fa;
}

.step-number {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, #00acc1 0%, #00838f 100%);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 16px;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(0,172,193,0.3);
}

.step-header h3 {
    margin: 0;
    font-size: 18px;
    color: #00838f;
}

.check-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 0;
    border-bottom: 1px solid #f5f5f5;
}

.check-item:last-of-type {
    border-bottom: none;
}

.check-item.check-ok {
    background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%);
    padding: 14px 14px;
    border-radius: 12px;
    margin-bottom: 10px;
    border: 2px solid #a5d6a7;
}

.check-item.check-fail {
    background: linear-gradient(135deg, #ffebee 0%, #ffcdd2 100%);
    padding: 14px 14px;
    border-radius: 12px;
    margin-bottom: 10px;
    border: 2px solid #ef9a9a;
}

.check-label {
    font-size: 15px;
    font-weight: 500;
    color: #263238;
}

.check-status {
    font-size: 14px;
    color: #2e7d32;
    font-weight: 500;
}

.check-status small {
    display: block;
    font-size: 12px;
    color: #546e7a;
    font-weight: 400;
    margin-top: 2px;
}

.btn-check {
    padding: 8px 16px;
    border: none;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    margin-left: 6px;
    transition: all 0.2s;
}

.btn-ok {
    background: linear-gradient(135deg, #66bb6a 0%, #43a047 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(102,187,106,0.3);
}

.btn-ok:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102,187,106,0.4);
}

.btn-fail {
    background: linear-gradient(135deg, #ef5350 0%, #e53935 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(239,83,80,0.3);
}

.btn-fail:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(239,83,80,0.4);
}

.problem-note {
    background: #fff3e0;
    border-left: 4px solid #ff9800;
    padding: 14px;
    margin-top: 10px;
    border-radius: 8px;
    font-size: 13px;
}

.problem-note strong {
    display: block;
    margin-bottom: 6px;
    color: #e65100;
}

.problem-note small {
    color: #546e7a;
}

/* === Timeline Items === */
.timeline-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px;
    background: #f5f5f5;
    border-radius: 12px;
    margin-bottom: 10px;
    border: 2px solid #e0e0e0;
}

.timeline-item.done {
    background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%);
    border-color: #a5d6a7;
}

.timeline-time {
    font-weight: 600;
    font-size: 16px;
    color: #263238;
}

.timeline-status {
    font-size: 13px;
    color: #78909c;
}

.timeline-status.done {
    color: #2e7d32;
    font-weight: 500;
}

.btn-timeline {
    padding: 8px 16px;
    background: linear-gradient(135deg, #00acc1 0%, #00838f 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0,172,193,0.3);
}

.btn-timeline:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,172,193,0.4);
}

/* === Emergency Box === */
.emergency-box {
    background: linear-gradient(135deg, #ffebee 0%, #ffcdd2 100%);
    border: 2px solid #ef9a9a;
    border-radius: 14px;
    padding: 18px;
    margin-top: 16px;
}

.emergency-box h4 {
    margin: 0 0 12px 0;
    font-size: 15px;
    color: #c62828;
}

.btn-emergency {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #e53935 0%, #c62828 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(229,57,53,0.3);
}

.btn-emergency:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(229,57,53,0.4);
}

/* === Modal === */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal.show {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: 20px;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
}

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

.modal-header h3 {
    font-size: 18px;
    color: #00838f;
}

.btn-close {
    width: 36px;
    height: 36px;
    border: 2px solid #e0e0e0;
    background: #f5f5f5;
    border-radius: 50%;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    color: #546e7a;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-close:hover {
    border-color: #00acc1;
    color: #00838f;
}

.modal-content form {
    padding: 24px;
}

.modal-footer {
    display: flex;
    gap: 12px;
    margin-top: 20px;
}

.modal-footer button {
    flex: 1;
}

/* === Mobile === */
@media (max-width: 640px) {
    .container {
        padding: 16px;
    }
    
    .login-box {
        padding: 30px 20px;
    }
    
    .step-section {
        padding: 16px;
    }
}

/* === Checkbox Groups === */
.checkbox-group {
    margin-bottom: 16px;
}

.checkbox-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px;
    background: #f5f5f5;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s;
}

.checkbox-item:hover {
    border-color: #00acc1;
    background: #e0f7fa;
}

.checkbox-item input[type="checkbox"] {
    width: 22px;
    height: 22px;
    cursor: pointer;
    accent-color: #00acc1;
}

.checkbox-item input[type="checkbox"]:disabled {
    opacity: 0.5;
}

.checkbox-label {
    font-size: 15px;
    font-weight: 500;
    color: #263238;
    flex: 1;
}

.checkbox-group textarea {
    width: 100%;
    margin-top: 8px;
}

/* === Button Group === */
.btn-group {
    display: flex;
    gap: 8px;
}

/* === Problem Form === */
.problem-form {
    background: #fff3e0;
    border: 2px solid #ff9800;
    border-radius: 12px;
    padding: 16px;
    margin-top: 12px;
}

.problem-form .form-group {
    margin-bottom: 12px;
}

.problem-form label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: #e65100;
    margin-bottom: 6px;
}

.problem-form textarea {
    width: 100%;
    padding: 10px;
    border: 2px solid #ffb74d;
    border-radius: 8px;
    font-size: 14px;
}

.problem-form small {
    display: block;
    margin-top: 4px;
    color: #78909c;
    font-size: 12px;
}

.btn-neutral {
    background: #f5f5f5;
    color: #546e7a;
    border: 2px solid #e0e0e0;
}

.btn-neutral:hover {
    background: #e0e0e0;
    border-color: #bdbdbd;
}
