* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #0a0e27 0%, #1a1a2e 100%);
    color: #fff;
    min-height: 100vh;
}

/* ============ VISTA PRINCIPAL ============ */

.main-view {
    padding: 20px 40px;
    min-height: 100vh;
    position: relative;
}

.header-main {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 30px;
    gap: 40px;
}

.time-section {
    text-align: left;
    flex: 0 0 auto;
}

.current-time {
    font-size: 36px;
    color: #fff;
    font-weight: bold;
    font-family: 'Courier New', monospace;
}

.current-date {
    font-size: 12px;
    color: #888;
    margin-top: 3px;
}

.title-section {
    flex: 1;
    text-align: center;
}

.title-section h1 {
    font-size: 28px;
    color: #fff;
    font-weight: 600;
}

.status-section {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: #888;
    flex: 0 0 auto;
}

.status-dot {
    width: 10px;
    height: 10px;
    background: #00ff00;
    border-radius: 50%;
    display: inline-block;
}

.container-main {
    max-width: 1200px;
    margin: 0 auto;
}

.shifts-grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 20px;
}

.shift-section-main {
    background: #0f1419;
    border: 1px solid #333;
    border-radius: 10px;
    padding: 20px;
    overflow: hidden;
    transition: all 0.3s;
}

.shift-section-main.active {
    border: 2px solid #00ff00;
    background: rgba(0, 255, 0, 0.08);
}

.shift-header-main {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid #333;
}

.shift-title-main {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 16px;
    font-weight: bold;
}

.shift-time-main {
    font-size: 11px;
    color: #888;
    margin-left: 5px;
}

.shift-status-main {
    font-size: 11px;
    color: #00ff00;
    background: rgba(0, 255, 0, 0.1);
    padding: 3px 10px;
    border-radius: 15px;
    font-weight: bold;
}

.people-list-main {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.person-item-main {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    background: transparent;
    border-radius: 6px;
    font-size: 13px;
    transition: all 0.2s;
}

.person-item-main:hover {
    background: rgba(0, 255, 0, 0.05);
}

.person-name-main {
    font-weight: 500;
    color: #fff;
    flex: 1;
}

.person-info-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.person-time-main {
    color: #888;
    font-size: 11px;
    min-width: 60px;
    text-align: right;
}

.warning-icon-main {
    color: #ff9900;
    font-size: 12px;
}

.empty-shift {
    color: #666;
    padding: 15px;
    text-align: center;
    font-size: 12px;
    font-style: italic;
}

/* Botão Admin */
.admin-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    padding: 12px 24px;
    background: #333;
    color: #fff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
    font-size: 13px;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
    z-index: 100;
}

.admin-btn:hover {
    background: #444;
    transform: scale(1.08);
}

/* ============ MODAL DE LOGIN ============ */

.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: #1a1a2e;
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.9);
    width: 100%;
    max-width: 350px;
    border: 1px solid #333;
    position: relative;
}

.login-modal h1 {
    text-align: center;
    margin-bottom: 30px;
    color: #00ff00;
    font-size: 24px;
}

.close-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    color: #888;
    font-size: 28px;
    cursor: pointer;
    transition: color 0.3s;
}

.close-btn:hover {
    color: #fff;
}

.input-field {
    width: 100%;
    padding: 12px;
    margin-bottom: 15px;
    background: #2d2d3d;
    border: 1px solid #444;
    border-radius: 5px;
    color: #fff;
    font-size: 14px;
}

.input-field:focus {
    outline: none;
    border-color: #00ff00;
    box-shadow: 0 0 10px rgba(0, 255, 0, 0.2);
}

.btn-login {
    width: 100%;
    padding: 12px;
    background: #00ff00;
    color: #000;
    border: none;
    border-radius: 5px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-login:hover {
    background: #00dd00;
    transform: scale(1.05);
}

.error-message {
    color: #ff4444;
    text-align: center;
    margin-top: 10px;
    font-size: 12px;
}

/* ============ DASHBOARD ADMIN ============ */

.admin-dashboard {
    padding: 20px;
    background: linear-gradient(135deg, #0a0e27 0%, #1a1a2e 100%);
    min-height: 100vh;
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #0f0f1e;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 30px;
    border-left: 4px solid #00ff00;
}

.header-left h1 {
    font-size: 28px;
    margin-bottom: 10px;
}

.header-left .current-time {
    font-size: 32px;
    color: #00ff00;
}

.header-left .current-date {
    margin-top: 5px;
}

.header-right {
    display: flex;
    gap: 15px;
}

.btn-logout {
    padding: 10px 20px;
    background: #ff4444;
    color: #fff;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
}

.btn-logout:hover {
    background: #dd0000;
}

.container-admin {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 20px;
    max-width: 1400px;
    margin: 0 auto;
}

/* Shifts Panel */
.shifts-panel {
    background: #1a1a2e;
    padding: 20px;
    border-radius: 10px;
    border: 1px solid #333;
    height: fit-content;
}

.shifts-panel h2 {
    margin-bottom: 20px;
    color: #00ff00;
}

.shifts-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.shift-box {
    padding: 15px;
    background: #0f1419;
    border-radius: 8px;
    border-left: 4px solid #666;
    cursor: pointer;
    transition: all 0.3s;
    border: 1px solid #444;
}

.shift-box:hover {
    border-color: #00ff00;
    transform: translateX(5px);
}

.shift-box.active {
    background: #1a3a1a;
    border-color: #00ff00;
    border-left-color: #00ff00;
}

.shift-title {
    font-weight: bold;
    font-size: 16px;
    margin-bottom: 5px;
}

.shift-time {
    font-size: 12px;
    color: #888;
}

.shift-count {
    font-size: 12px;
    color: #00ff00;
    margin-top: 5px;
}

/* Management Panel */
.management-panel {
    background: #1a1a2e;
    padding: 20px;
    border-radius: 10px;
    border: 1px solid #333;
}

.tab-buttons {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    border-bottom: 1px solid #333;
}

.tab-btn {
    padding: 12px 20px;
    background: transparent;
    color: #888;
    border: none;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all 0.3s;
    font-weight: bold;
}

.tab-btn.active {
    color: #00ff00;
    border-bottom-color: #00ff00;
}

.tab-btn:hover {
    color: #00ff00;
}

.tab-content h3 {
    margin-top: 20px;
    margin-bottom: 15px;
    color: #00ff00;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 20px;
}

.textarea {
    resize: vertical;
    min-height: 80px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #888;
    cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: #00ff00;
}

.btn-primary {
    padding: 12px;
    background: #00ff00;
    color: #000;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s;
}

.btn-primary:hover {
    background: #00dd00;
}

.btn-danger {
    padding: 12px;
    background: #ff4444;
    color: #fff;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s;
}

.btn-danger:hover {
    background: #dd0000;
}

.info-message {
    padding: 10px;
    background: #1a3a1a;
    color: #00ff00;
    border-radius: 5px;
    text-align: center;
    font-size: 12px;
}

/* Messages Container */
.messages-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.message-card {
    padding: 15px;
    background: #0f1419;
    border-radius: 8px;
    border-left: 4px solid #00ff00;
    border: 1px solid #444;
}

.message-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.person-name {
    font-weight: bold;
    font-size: 16px;
    color: #00ff00;
}

.shift-badge {
    padding: 4px 12px;
    background: #1a3a1a;
    border-radius: 20px;
    font-size: 12px;
    color: #00ff00;
}

.warnings-list {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #444;
}

.warning-item {
    padding: 8px;
    background: #3d1a1a;
    border-radius: 5px;
    margin-top: 8px;
    font-size: 12px;
    color: #ff9999;
    border-left: 2px solid #ff4444;
}

.warning-reason {
    margin-top: 5px;
    color: #fff;
}

.warning-date {
    margin-top: 5px;
    color: #888;
    font-size: 11px;
}

/* Users Container */
.users-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.user-card {
    padding: 15px;
    background: #0f1419;
    border-radius: 8px;
    border-left: 4px solid #4444ff;
    border: 1px solid #444;
}

.user-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.user-name {
    font-weight: bold;
    font-size: 16px;
    color: #4444ff;
}

.user-permission {
    padding: 4px 12px;
    background: #1a1a4d;
    border-radius: 20px;
    font-size: 12px;
    color: #4444ff;
}

.no-data {
    text-align: center;
    color: #888;
    padding: 20px;
    font-style: italic;
}

@media (max-width: 1024px) {
    .container-admin {
        grid-template-columns: 1fr;
    }

    .shifts-grid-container {
        grid-template-columns: 1fr;
    }

    .header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .header-right {
        width: 100%;
    }

    .btn-logout {
        width: 100%;
    }
}