/* Import Font */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

/* Root Variables for Color Scheme */
:root {
    --primary-color: #00A9FF;
    --primary-hover: #008DDB;
    --secondary-color: #34495e;
    --background-color: #f4f7f6;
    --sidebar-bg: #2c3e50;
    --text-color: #333;
    --text-color-light: #ecf0f1;
    --border-color: #ddd;
    --card-bg: #ffffff;
    --shadow: 0 4px 8px rgba(0,0,0,0.1);
    --success-color: #2ecc71;
    --error-color: #e74c3c;
    --warning-color: #f39c12;
}

/* General Styling */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
}

/* Login Page Styling */
.login-body {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(135deg, var(--sidebar-bg), var(--secondary-color));
}

.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    padding: 20px;
}

.login-box {
    width: 100%;
    max-width: 400px;
    background: var(--card-bg);
    padding: 40px 30px;
    border-radius: 15px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
    animation: fadeIn 0.5s ease-in-out;
}

.login-header {
    text-align: center;
    margin-bottom: 25px;
}

.login-header .logo {
    width: 80px;
    margin-bottom: 10px;
}

.login-header h1 {
    color: var(--secondary-color);
    font-size: 24px;
    margin-bottom: 5px;
}

.login-header p {
    color: #777;
    font-size: 14px;
}

.input-group {
    position: relative;
    margin-bottom: 20px;
}

.input-group i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #aaa;
    transition: color 0.3s;
}

.input-group input, .input-group select {
    width: 100%;
    padding: 12px 15px 12px 45px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    outline: none;
    font-size: 16px;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.input-group input:focus, .input-group select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 5px rgba(0, 169, 255, 0.5);
}

.input-group input:focus + i, .input-group select:focus + i {
    color: var(--primary-color);
}


.input-group #togglePassword {
    left: auto;
    right: 15px;
    cursor: pointer;
}

.login-btn {
    width: 100%;
    padding: 12px;
    border: none;
    background: var(--primary-color);
    color: white;
    font-size: 16px;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.2s;
    display: flex;
    justify-content: center;
    align-items: center;
}

.login-btn:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
}

.error-message {
    color: var(--error-color);
    text-align: center;
    margin-bottom: 15px;
    font-size: 14px;
}

/* Loader Animation */
.loader {
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top: 3px solid #fff;
    width: 20px;
    height: 20px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Main System Layout */
body {
    background-color: var(--background-color);
    color: var(--text-color);
    display: flex;
}

.sidebar {
    width: 260px;
    background: var(--sidebar-bg);
    color: var(--text-color-light);
    display: flex;
    flex-direction: column;
    height: 100vh;
    position: fixed;
    transition: width 0.3s;
}

.sidebar-header {
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.sidebar-header img {
    width: 40px;
}

.sidebar-header h2 {
    font-size: 20px;
}

.sidebar-nav {
    flex-grow: 1;
    list-style: none;
    padding-top: 20px;
}

.sidebar-nav li a {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px 20px;
    color: var(--text-color-light);
    text-decoration: none;
    transition: background 0.3s, padding-left 0.3s;
}

.sidebar-nav li a:hover, .sidebar-nav li.active a {
    background: var(--primary-color);
    padding-left: 25px;
}

.sidebar-nav li a i {
    font-size: 18px;
    width: 20px;
    text-align: center;
}

.main-content {
    margin-left: 260px;
    flex-grow: 1;
    padding: 20px;
    transition: margin-left 0.3s;
    width: calc(100% - 260px);
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--card-bg);
    padding: 10px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    box-shadow: var(--shadow);
}

.header h1 {
    font-size: 24px;
}

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

.battery-status {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
}

.battery-status .fas {
    font-size: 20px;
}

.battery-status.low {
    color: var(--error-color);
}
.battery-status.mid {
    color: var(--warning-color);
}
.battery-status.full {
    color: var(--success-color);
}


.logout-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 15px;
    background: var(--error-color);
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.3s;
}

.logout-btn:hover {
    background: #c0392b;
}

/* Card Styling */
.card {
    background: var(--card-bg);
    padding: 20px;
    border-radius: 8px;
    box-shadow: var(--shadow);
    margin-bottom: 20px;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 10px;
}

.card-header h2 {
    font-size: 18px;
}

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

.styled-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.styled-table thead tr {
    background-color: var(--secondary-color);
    color: white;
    text-align: left;
}

.styled-table th, .styled-table td {
    padding: 12px 15px;
}

.styled-table tbody tr {
    border-bottom: 1px solid var(--border-color);
}

.styled-table tbody tr:nth-of-type(even) {
    background-color: #f8f8f8;
}

.styled-table tbody tr:last-of-type {
    border-bottom: 2px solid var(--primary-color);
}

.styled-table tbody tr:hover {
    background-color: #e8f7ff;
}

/* Button Styling */
.btn {
    padding: 8px 12px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: opacity 0.3s;
    color: white;
    text-decoration: none;
    font-size: 14px;
    margin: 0 2px;
}
.btn:hover {
    opacity: 0.8;
}

.btn-primary { background-color: var(--primary-color); }
.btn-success { background-color: var(--success-color); }
.btn-danger { background-color: var(--error-color); }
.btn-warning { background-color: var(--warning-color); }
.btn-info { background-color: #3498db; }


.action-buttons button, .action-buttons a {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.table-controls {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.table-controls .form-group {
    margin-bottom: 0;
}

/* Form Styling */
.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.form-group {
    margin-bottom: 15px;
    display: flex;
    flex-direction: column;
}

.form-group label {
    margin-bottom: 5px;
    font-weight: 500;
}

.form-group input, .form-group select {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    font-size: 14px;
}

.form-actions {
    margin-top: 20px;
    display: flex;
    gap: 10px;
}

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

.popup-box {
    background: var(--card-bg);
    padding: 30px;
    border-radius: 10px;
    width: 90%;
    max-width: 500px;
    text-align: center;
    animation: fadeIn 0.3s;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

.popup-box h2 {
    margin-bottom: 15px;
    color: var(--secondary-color);
}
.popup-box p {
    margin-bottom: 25px;
    color: #555;
}
.popup-actions {
    display: flex;
    justify-content: center;
    gap: 15px;
}

/* Fingerprint Animation */
.fingerprint-scanner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.fingerprint-icon {
    font-size: 120px;
    color: #ccc;
    position: relative;
}

.fingerprint-icon .scan-line {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    height: 4px;
    background: var(--primary-color);
    border-radius: 2px;
    animation: scan 2s linear infinite;
    display: none;
}

.fingerprint-scanner.scanning .fingerprint-icon {
    color: var(--primary-color);
}

.fingerprint-scanner.scanning .scan-line {
    display: block;
}

.fingerprint-status {
    font-size: 18px;
    font-weight: 500;
    height: 25px;
}

/* Responsive */
@media (max-width: 768px) {
    .sidebar {
        width: 0;
        overflow: hidden;
    }
    .main-content {
        margin-left: 0;
        width: 100%;
    }
    .header h1 {
        font-size: 20px;
    }
}


/* Keyframe Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

@keyframes scan {
    0% { top: 0; }
    50% { top: 100%; }
    100% { top: 0; }
}
/* Add this to the end of assets/css/style.css */

#updateForm p {
    font-size: 14px;
    color: #555;
}

#updateForm p strong {
    color: var(--secondary-color);
}
/* Add these styles to the end of your style.css file */

.alert-success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-danger {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}