/* ============================================
   SMARTERS PRO CLASSIC - METALLIC BLUE THEME
   ============================================ */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', -apple-system, sans-serif;
}

:root {
    --bg-primary: #0a1628;
    --bg-secondary: #0d1f3c;
    --bg-card: rgba(10, 25, 47, 0.9);
    --metal-blue: #0a192f;
    --metal-blue-light: #172a45;
    --metal-blue-lighter: #1a365d;
    --celestial-blue: #00b4d8;
    --celestial-light: #48cae4;
    --celestial-gradient: linear-gradient(135deg, #00b4d8, #48cae4);
    --text-primary: #e0e7ff;
    --text-secondary: #8899aa;
    --sidebar-width: 260px;
    --shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

html, body {
    background: var(--bg-primary);
    min-height: 100vh;
    color: var(--text-primary);
}

/* ============================================
   LOGIN
   ============================================ */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #0a1628, #0d1f3c);
    padding: 20px;
}

.login-box {
    background: linear-gradient(145deg, rgba(10, 25, 47, 0.95), rgba(23, 42, 69, 0.95));
    padding: 45px;
    border-radius: 24px;
    width: 100%;
    max-width: 420px;
    border: 1px solid rgba(0, 180, 216, 0.15);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.6);
}

.login-logo {
    text-align: center;
    margin-bottom: 25px;
}

.login-logo i {
    font-size: 40px;
    background: var(--celestial-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.login-logo h1 {
    font-size: 28px;
    background: var(--celestial-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-top: 5px;
    letter-spacing: 2px;
}

.login-logo span {
    display: block;
    font-size: 12px;
    color: var(--text-secondary);
    letter-spacing: 4px;
    margin-top: 2px;
}

.login-subtitle {
    text-align: center;
    color: var(--text-secondary);
    margin-bottom: 25px;
    font-size: 14px;
}

.login-footer {
    text-align: center;
    margin-top: 20px;
    color: var(--text-secondary);
    font-size: 12px;
}

/* ============================================
   SIDEBAR
   ============================================ */
.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background: linear-gradient(180deg, #0a1628, #0d1f3c);
    border-right: 1px solid rgba(0, 180, 216, 0.08);
    padding: 20px 0;
    overflow-y: auto;
    z-index: 1000;
    box-shadow: 4px 0 30px rgba(0, 0, 0, 0.3);
}

.sidebar-brand {
    padding: 15px 25px 20px;
    border-bottom: 1px solid rgba(0, 180, 216, 0.08);
    margin-bottom: 15px;
}

.sidebar-brand h2 {
    font-size: 20px;
    background: var(--celestial-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 700;
}

.brand-version {
    display: block;
    font-size: 10px;
    color: var(--text-secondary);
    letter-spacing: 2px;
    margin-top: 2px;
}

.sidebar-menu {
    list-style: none;
    padding: 0 12px;
}

.sidebar-menu li { margin: 2px 0; }

.sidebar-menu a {
    display: flex;
    align-items: center;
    padding: 11px 16px;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: 10px;
    transition: all 0.3s ease;
    gap: 12px;
    font-size: 14px;
    position: relative;
}

.sidebar-menu a:hover {
    background: rgba(0, 180, 216, 0.08);
    color: var(--celestial-light);
    transform: translateX(4px);
}

.sidebar-menu a.active {
    background: rgba(0, 180, 216, 0.12);
    color: var(--celestial-light);
}

.sidebar-menu a.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 20%;
    height: 60%;
    width: 3px;
    background: var(--celestial-gradient);
    border-radius: 3px;
}

.sidebar-menu a i { width: 20px; text-align: center; font-size: 16px; }
.sidebar-menu a span { font-weight: 500; }

.menu-divider {
    height: 1px;
    background: rgba(0, 180, 216, 0.08);
    margin: 15px 16px;
}

/* ============================================
   MAIN CONTENT
   ============================================ */
.main-content {
    margin-left: var(--sidebar-width);
    padding: 25px 30px 40px;
    min-height: 100vh;
}

.top-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(0, 180, 216, 0.06);
}

.top-header h1 {
    font-size: 26px;
    background: var(--celestial-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.welcome-text {
    font-size: 13px;
    color: var(--text-secondary);
}

.header-info {
    font-size: 14px;
    color: var(--text-secondary);
}

/* ============================================
   CARDS
   ============================================ */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 20px;
    margin-bottom: 25px;
}

.card-metal {
    background: linear-gradient(145deg, rgba(10, 25, 47, 0.9), rgba(23, 42, 69, 0.9));
    border: 1px solid rgba(0, 180, 216, 0.1);
    border-radius: 16px;
    padding: 20px 22px;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.card-metal:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0, 180, 216, 0.12);
    border-color: rgba(0, 180, 216, 0.2);
}

.card-icon { font-size: 26px; color: var(--celestial-blue); margin-bottom: 10px; }
.card-number {
    font-size: 30px;
    font-weight: 700;
    background: var(--celestial-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.card-label { color: var(--text-secondary); font-size: 13px; margin-top: 2px; }
.card-status { margin-top: 10px; font-size: 12px; color: var(--celestial-light); }

/* ============================================
   BOTÕES
   ============================================ */
.btn-primary {
    background: var(--celestial-gradient);
    color: #fff;
    border: none;
    padding: 10px 28px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 180, 216, 0.25);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-primary:hover {
    transform: scale(1.04);
    box-shadow: 0 8px 30px rgba(0, 180, 216, 0.4);
}

.btn-outline {
    background: transparent;
    color: var(--celestial-light);
    border: 2px solid var(--celestial-blue);
    padding: 8px 24px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-outline:hover {
    background: rgba(0, 180, 216, 0.08);
    transform: scale(1.04);
}

.btn-icon {
    padding: 6px 10px;
    border-radius: 8px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    transition: all 0.2s;
}

.btn-edit { color: #48cae4; }
.btn-edit:hover { background: rgba(0, 180, 216, 0.1); }

.btn-delete { color: #ff6b6b; }
.btn-delete:hover { background: rgba(255, 107, 107, 0.1); }

/* ============================================
   SEÇÕES
   ============================================ */
.actions-section,
.activities-section {
    background: rgba(10, 25, 47, 0.4);
    border-radius: 16px;
    padding: 20px 22px;
    margin-bottom: 20px;
    border: 1px solid rgba(0, 180, 216, 0.06);
}

.actions-section h3,
.activities-section h3 {
    color: var(--celestial-light);
    margin-bottom: 15px;
    font-size: 17px;
}

.actions-buttons {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.activities-list { display: flex; flex-direction: column; gap: 5px; }

.activity-item {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid rgba(0, 180, 216, 0.04);
    font-size: 14px;
}

.activity-item:last-child { border-bottom: none; }
.activity-time { color: var(--text-secondary); font-size: 12px; }

/* ============================================
   TABELAS
   ============================================ */
.table-container {
    background: rgba(10, 25, 47, 0.5);
    border-radius: 16px;
    padding: 20px;
    border: 1px solid rgba(0, 180, 216, 0.06);
    overflow-x: auto;
}

.table-container table {
    width: 100%;
    border-collapse: collapse;
}

.table-container th {
    text-align: left;
    padding: 12px 12px;
    color: var(--celestial-light);
    font-weight: 600;
    font-size: 13px;
    border-bottom: 2px solid rgba(0, 180, 216, 0.08);
}

.table-container td {
    padding: 12px 12px;
    border-bottom: 1px solid rgba(0, 180, 216, 0.03);
    font-size: 14px;
}

.table-container tr:hover td {
    background: rgba(0, 180, 216, 0.03);
}

/* ============================================
   BADGES
   ============================================ */
.badge {
    padding: 4px 14px;
    border-radius: 50px;
    font-size: 12px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.badge-online {
    background: rgba(0, 180, 216, 0.15);
    color: var(--celestial-blue);
}

.badge-offline {
    background: rgba(255, 107, 107, 0.15);
    color: #ff6b6b;
}

/* ============================================
   ALERTAS
   ============================================ */
.alert-success,
.alert-error {
    padding: 14px 20px;
    border-radius: 12px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
}

.alert-success {
    background: rgba(0, 180, 216, 0.1);
    border: 1px solid rgba(0, 180, 216, 0.2);
    color: var(--celestial-light);
}

.alert-error {
    background: rgba(255, 107, 107, 0.1);
    border: 1px solid rgba(255, 107, 107, 0.2);
    color: #ff6b6b;
}

/* ============================================
   FORMULÁRIOS
   ============================================ */
.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    color: var(--text-secondary);
    margin-bottom: 4px;
    font-size: 13px;
}

.form-group label i { color: var(--celestial-blue); margin-right: 6px; }

.form-group input,
.form-group select {
    width: 100%;
    padding: 11px 15px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(0, 180, 216, 0.12);
    border-radius: 10px;
    color: #fff;
    font-size: 14px;
    transition: all 0.3s;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--celestial-blue);
    box-shadow: 0 0 20px rgba(0, 180, 216, 0.05);
}

.form-group select option {
    background: #0a192f;
    color: #fff;
}

/* ============================================
   MODAL
   ============================================ */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    justify-content: center;
    align-items: center;
    z-index: 2000;
}

.modal-box {
    background: linear-gradient(145deg, #0a192f, #1a365d);
    padding: 35px;
    border-radius: 20px;
    max-width: 500px;
    width: 90%;
    border: 1px solid rgba(0, 180, 216, 0.12);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.5);
    max-height: 90vh;
    overflow-y: auto;
}

.modal-box h2 {
    color: var(--celestial-light);
    margin-bottom: 20px;
    font-size: 22px;
}

.modal-actions {
    display: flex;
    gap: 12px;
    margin-top: 5px;
    flex-wrap: wrap;
}

/* ============================================
   EMPTY STATE
   ============================================ */
.empty-state {
    text-align: center;
    padding: 50px 20px;
    color: var(--text-secondary);
}

.empty-state p {
    margin: 15px 0;
    font-size: 16px;
}

.empty-state .btn-primary { margin-top: 10px; }

/* ============================================
   PERFIL
   ============================================ */
.profile-container {
    max-width: 600px;
}

.profile-card {
    background: linear-gradient(145deg, rgba(10, 25, 47, 0.9), rgba(23, 42, 69, 0.9));
    border-radius: 16px;
    padding: 30px;
    border: 1px solid rgba(0, 180, 216, 0.1);
    display: flex;
    align-items: center;
    gap: 25px;
}

.profile-avatar { flex-shrink: 0; }
.profile-info h2 { font-size: 22px; color: var(--text-primary); }
.profile-info p { color: var(--text-secondary); font-size: 14px; margin-top: 3px; }

/* ============================================
   RESPONSIVO
   ============================================ */
@media (max-width: 992px) {
    .sidebar { width: 70px; padding: 10px 0; }
    .sidebar-brand h2 { font-size: 0; }
    .sidebar-brand h2 i { font-size: 24px; -webkit-text-fill-color: initial; color: var(--celestial-blue); }
    .brand-version { display: none; }
    .sidebar-menu a { padding: 12px 14px; font-size: 0; justify-content: center; }
    .sidebar-menu a i { font-size: 18px; }
    .sidebar-menu a span { display: none; }
    .sidebar-menu a.active::before { display: none; }
    .main-content { margin-left: 70px; padding: 15px; }
    .cards-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 600px) {
    .cards-grid { grid-template-columns: 1fr; }
    .top-header { flex-direction: column; align-items: flex-start; gap: 10px; }
    .profile-card { flex-direction: column; text-align: center; }
    .login-box { padding: 30px 20px; }
    .modal-box { padding: 25px 20px; }
    .actions-buttons { flex-direction: column; }
    .actions-buttons a { width: 100%; justify-content: center; }
}

/* ============================================
   SCROLLBAR
   ============================================ */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: rgba(0, 0, 0, 0.2); border-radius: 3px; }
::-webkit-scrollbar-thumb { background: var(--celestial-blue); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--celestial-light); }

/* ============================================
   ANIMAÇÕES
   ============================================ */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.alert-success, .alert-error {
    animation: fadeIn 0.3s ease;
}

.card-metal {
    animation: fadeIn 0.4s ease;
}

.card-metal:nth-child(2) { animation-delay: 0.05s; }
.card-metal:nth-child(3) { animation-delay: 0.1s; }
.card-metal:nth-child(4) { animation-delay: 0.15s; }