/* General Styles */
body {
    font-family: Segoe UI, Tahoma, Geneva, Verdana, 'sans-serif';
    margin: 0;
    padding: 0;
    color: #333;
}

/* Background with overlay */
.login-bg {
    background: url('assets/back.png') no-repeat center center fixed;
    background-size: cover;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.login-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.3);
    z-index: 0;
}

/* Login Container */
.login-container {
    background-color: rgba(255, 255, 255, 0.95);
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    width: 350px;
    text-align: center;
    position: relative;
    z-index: 1;
    backdrop-filter: blur(2px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Header Styles */
.login-header h1 {
    color: #2c3e50;
    margin-bottom: 10px;
    font-size: 24px;
    font-weight: 600;
}

.logo {
    width: 80px;
    height: auto;
    margin-bottom: 20px;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

/* Form Styles */
.login-form {
    margin-top: 20px;
}

.form-group {
    margin-bottom: 20px;
    text-align: left;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #555;
}

.form-group input {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 14px;
    box-sizing: border-box;
    transition: all 0.3s ease;
    background-color: rgba(255, 255, 255, 0.8);
}

.form-group input:focus {
    border-color: #8b0000;
    outline: none;
    box-shadow: 0 0 0 2px rgba(139, 0, 0, 0.2);
}

/* Button Styles */
.login-button {
    width: 100%;
    padding: 12px;
    background-color: #8b0000;
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 10px;
}

.login-button:hover {
    background-color: #6d0000;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* Error Message Styles */
.error-message {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 15px;
    background-color: #FFF2F2;
    border-radius: 6px;
    border: 1px solid #FFD6D6;
    margin-top: 15px;
    color: #D93025;
    font-size: 14px;
    font-weight: 500;
    animation: fadeIn 0.3s ease-out;
}

.error-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    background-color: #D93025;
    color: white;
    border-radius: 50%;
    font-weight: bold;
    font-size: 14px;
    flex-shrink: 0;
}

.error-text {
    line-height: 1.4;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Dashboard Layout */
.dashboard {
    display: flex;
    min-height: 100vh;
    font-family: Segoe UI, Tahoma, Geneva, Verdana, 'sans-serif';
}

/* Sidebar Styles */
.sidebar {
    width: 250px;
    background: #6d0000;
    color: white;
    padding: 20px 0;
    display: flex;
    flex-direction: column;
}

.sidebar-header {
    padding: 0 20px 20px;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

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

.sidebar h3 {
    margin: 0;
    font-size: 18px;
    color: white;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    flex: 1; /* take full height */
    padding: 0 0 20px;
}

.sidebar-nav a {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    color: #ecf0f1;
    text-decoration: none;
    transition: all 0.3s;
}

.sidebar-nav a i {
    margin-right: 10px;
    width: 20px;
    text-align: center;
}

.sidebar-nav a:hover, 
.sidebar-nav a.active {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.sidebar-nav a.active {
    border-left: 4px solid #e74c3c;
}

/* Sidebar Buttons Container */
.sidebar-buttons {
    margin-top: auto; /* push to bottom */
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Unified Sidebar Button */
.sidebar-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px;
    background-color: #838383;
    color: #000000;
    border: 1px solid #e0e0e0;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    text-align: center;
    margin: 5px 0;
}

.sidebar-btn:hover {
    background-color: #b3b3b3dc;
    transform: translateY(-2px);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    color: #000000;
}

/* Main Content Styles */
.main-content {
    flex: 1;
    background: #f5f7fa;
    min-height: 100vh;
}

.top-bar {
    background: white;
    padding: 15px 20px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    display: flex;
    justify-content: flex-end;
}

.search-box {
    display: flex;
    align-items: center;
}

.search-box input {
    padding: 8px 15px;
    border: 1px solid #ddd;
    border-radius: 4px 0 0 4px;
    outline: none;
}

.search-box button {
    padding: 8px 15px;
    background: #3498db;
    color: white;
    border: none;
    border-radius: 0 4px 4px 0;
    cursor: pointer;
}

.dashboard-content {
    padding: 20px;
}

/* Stats Cards */
.stats-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin: 20px 0;
}

.stat-card {
    background: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    text-align: center;
}

.stat-card h3 {
    margin: 0 0 5px;
    color: #7f8c8d;
    font-size: 16px;
}

.stat-card p {
    margin: 0;
    color: #95a5a6;
    font-size: 14px;
}

.stat-number {
    font-size: 32px;
    font-weight: bold;
    color: #2c3e50;
    margin: 10px 0 0;
}

/* Dashboard Sections */
.dashboard-row {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 20px;
    margin: 30px 0;
}

.maintenance-section, 
.problem-device-section {
    background: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.maintenance-section h2, 
.problem-device-section h2 {
    margin-top: 0;
    color: #2c3e50;
    font-size: 18px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

/* Chart Styles */
.chart-placeholder {
    height: 250px;
    margin-top: 20px;
    position: relative;
}

.chart-labels {
    display: flex;
    justify-content: space-around;
    position: absolute;
    bottom: 0;
    width: 100%;
    padding: 10px 0;
    color: #7f8c8d;
    font-size: 12px;
}

.chart-bars {
    display: flex;
    justify-content: space-around;
    align-items: flex-end;
    height: calc(100% - 40px);
    padding: 0 20px;
}

.bar {
    width: 12%;
    background: #3498db;
    border-radius: 4px 4px 0 0;
    transition: height 0.5s ease;
}

/* Action Buttons */
.action-buttons {
    margin-top: 20px;
    text-align: right;
}

.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s;
}

.btn-primary {
    background: #e74c3c;
    color: white;
}

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

.btn i {
    margin-right: 8px;
}

/* Edit Form Styles */
.edit-form-container {
    background: white;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.edit-form {
    display: flex;
    flex-direction: column;
}

.form-row {
    display: flex;
    gap: 20px;
    margin-bottom: 15px;
}

.form-group {
    flex: 1;
    display: flex;
    flex-direction: column;
}

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

.form-group input,
.form-group select {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: inherit;
}

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

.btn-save {
    background-color: #2ecc71;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-family: inherit;
}

.btn-cancel {
    background-color: #e74c3c;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-family: inherit;
    text-decoration: none;
    text-align: center;
}

.btn-save:hover, 
.btn-cancel:hover {
    opacity: 0.9;
}


