/* General */
body {
    font-family: 'Roboto', sans-serif;
    background: #f4f6f9;
    margin: 0;
}

.main-wrapper {
    width: 100%;
    min-height: 100vh;
}

/* Top Menu */
.top-menu {
    background: #764ba2;
    padding: 10px 20px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.top-menu ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
}

.top-menu ul li {
    margin-right: 15px;
}

.top-menu ul li a {
    color: #fff;
    text-decoration: none;
    padding: 8px 15px;
    border-radius: 5px;
    font-weight: 500;
    transition: 0.3s;
}

.top-menu ul li a:hover {
    background: #667eea;
}

/* Content */
.content {
    padding: 20px 30px;
}

/* Page Header */
.page-header h1 {
    margin: 0 0 20px 0;
    color: #333;
}

/* Form Container */
.form-container {
    background: #fff;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 30px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.form-container form {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.form-container input[type="text"], 
.form-container input[type="number"] {
    flex: 1;
    padding: 10px 12px;
    border: 1px solid #ccc;
    border-radius: 6px;
    outline: none;
}

.form-container button {
    padding: 10px 20px;
    background: #764ba2;
    color: #fff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: 0.3s;
}

.form-container button:hover {
    background: #667eea;
}

/* Table */
.data-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.data-table th, .data-table td {
    padding: 12px 15px;
    border-bottom: 1px solid #ddd;
    text-align: left;
}

.data-table th {
    background: #764ba2;
    color: #fff;
}

.data-table tr:hover {
    background: #f1f1f1;
}

/* Action Buttons */
.edit-btn {
    color: #fff;
    background: #ffa500;
    padding: 5px 10px;
    border-radius: 5px;
    text-decoration: none;
    margin-right: 5px;
    font-size: 14px;
}

.delete-btn {
    color: #fff;
    background: #e74c3c;
    padding: 5px 10px;
    border-radius: 5px;
    text-decoration: none;
    font-size: 14px;
}

.edit-btn:hover {
    background: #ff8c00;
}

.delete-btn:hover {
    background: #c0392b;
}

/* Dashboard Cards */
.cards {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-top: 20px;
}

.card {
    background: #fff;
    flex: 1;
    min-width: 180px;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    text-align: center;
}

.card h3 {
    margin-bottom: 15px;
    color: #764ba2;
    font-size: 18px;
}

.card p {
    font-size: 24px;
    font-weight: bold;
}

/* Login Page */
.login-wrapper {
    width: 100%;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    background: linear-gradient(to right, #667eea, #764ba2);
}

.login-card {
    background: #fff;
    padding: 50px 40px;
    border-radius: 15px;
    box-shadow: 0 15px 40px rgba(0,0,0,0.3);
    width: 360px;
    text-align: center;
}

.login-logo {
    font-size: 50px;
    margin-bottom: 15px;
}

.login-card h2 {
    margin-bottom: 30px;
    color: #333;
}

.login-card input[type="text"],
.login-card input[type="password"] {
    width: 100%;
    padding: 12px 15px;
    font-size: 16px;
    border: 1px solid #ccc;
    border-radius: 8px;
    outline: none;
    margin-bottom: 20px;
    transition: 0.3s;
}

.login-card input[type="text"]:focus,
.login-card input[type="password"]:focus {
    border-color: #764ba2;
    box-shadow: 0 0 5px rgba(118,75,162,0.5);
}

.login-card button {
    width: 100%;
    padding: 12px;
    background: #764ba2;
    color: #fff;
    font-size: 16px;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: 0.3s;
}

.login-card button:hover {
    background: #667eea;
}

.error-msg {
    color: red;
    margin-top: 10px;
    font-size: 14px;
}

.footer-text {
    margin-top: 20px;
    font-size: 12px;
    color: #888;
}
/* Sidebar */
.sidebar {
    width: 220px;
    background: #764ba2;
    color: #fff;
    position: fixed;
    top: 0;
    left: 0;
    height: 100%;
    padding: 20px 10px;
    transition: 0.3s;
    z-index: 1000;
}

.sidebar h2 {
    text-align: center;
    margin-bottom: 30px;
}

.sidebar ul {
    list-style: none;
    padding: 0;
}

.sidebar ul li {
    margin-bottom: 15px;
}

.sidebar ul li a {
    color: #fff;
    text-decoration: none;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    border-radius: 6px;
    transition: 0.3s;
}

.sidebar ul li a:hover {
    background: #667eea;
}

/* Menu Toggle (for mobile) */
.menu-toggle {
    display: none;
    position: fixed;
    top: 15px;
    left: 15px;
    font-size: 24px;
    color: #764ba2;
    background: #fff;
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
    z-index: 1100;
}

/* Content */
.content {
    margin-left: 220px; /* Important: sidebar width */
    padding: 30px;
    min-height: 100vh;
    transition: margin-left 0.3s;
    background: #f4f6f9;
}

/* Responsive */
@media (max-width: 768px){
    .sidebar {
        left: -250px;
    }
    .sidebar.active {
        left: 0;
    }
    .content {
        margin-left: 0;
    }
    .menu-toggle {
        display: block;
    }
}
