/* Import base styles */
@import url('https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css');

/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    min-height: 100vh;
    padding: 2rem 0;
}

/* Admin Login Section Styles */

.admin-login-section {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 2rem;
}

.admin-login-section .form-card {
    background: white;
    border-radius: 1.5rem;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    padding: 4rem;
    width: 100%;
    max-width: 450px;
    animation: slideUp 0.4s ease-out;
}

.admin-login-section .form-header {
    text-align: center;
    margin-bottom: 2rem;
}

.admin-login-section .form-header i {
    font-size: 3.5rem;
    color: #0f766e;
    margin-bottom: 1rem;
    display: block;
    text-align: center;
}

.admin-login-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.admin-login-form .form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.admin-login-form .form-group label {
    font-weight: 600;
    color: #1f2937;
    font-size: 0.95rem;
}

.admin-login-form .form-group input {
    padding: 1rem;
    border: 2px solid #ddd;
    border-radius: 0.5rem;
    font-family: inherit;
    font-size: 0.95rem;
    transition: all 250ms cubic-bezier(0.4, 0, 0.2, 1);
    background-color: white;
    color: #1f2937;
}

.admin-login-form .form-group input:focus {
    outline: none;
    border-color: #0f766e;
    box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.1);
}

.admin-login-form .form-group input::placeholder {
    color: #6b7280;
}

.back-to-login {
    margin-top: 2rem;
    text-align: center;
}

.btn-secondary {
    background: linear-gradient(135deg, #6b7280 0%, #4b5563 100%);
    color: white;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 1rem 2rem;
    border: none;
    border-radius: 0.5rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 250ms cubic-bezier(0.4, 0, 0.2, 1);
    min-height: 48px;
}

.btn-secondary:hover {
    background: linear-gradient(135deg, #4b5563 0%, #6b7280 100%);
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

/* Admin Section Styles */

.admin-section {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.admin-section .form-card {
    background: white;
    border-radius: 1.5rem;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    padding: 4rem;
    width: 100%;
    animation: slideUp 0.4s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.admin-section .form-header {
    text-align: center;
    margin-bottom: 3rem;
}

.admin-section .form-header i {
    font-size: 3.5rem;
    color: #0f766e;
    margin-bottom: 1rem;
    display: block;
}

.admin-section .form-header h1 {
    font-size: 1.75rem;
    color: #1f2937;
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.admin-section .form-header p {
    color: #6b7280;
    font-size: 0.95rem;
}

/* Add Book Form Styles in Admin */

.admin-section .add-book-container {
    max-width: 1150px;
    margin: 0 auto 3rem auto;
}

.admin-section .add-book-container .form-card {
    background: white;
    border-radius: 1rem;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    padding: 2.5rem;
    border: 2px solid transparent;
    transition: all 0.3s;
}

.admin-section .add-book-container .form-card:hover {
    border-color: #14b8a6;
    transform: translateY(-2px);
}

.admin-section .add-book-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.admin-section .add-book-form .form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.admin-section .add-book-form .form-group label {
    font-weight: 600;
    color: #1f2937;
    font-size: 0.95rem;
}

.admin-section .add-book-form .form-group input {
    padding: 1rem;
    border: 2px solid #ddd;
    border-radius: 0.5rem;
    font-family: inherit;
    font-size: 0.95rem;
    transition: all 250ms cubic-bezier(0.4, 0, 0.2, 1);
    background-color: white;
    color: #1f2937;
}

.admin-section .add-book-form .form-group input:focus {
    outline: none;
    border-color: #0f766e;
    box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.1);
}

.admin-section .add-book-form .form-group input::placeholder {
    color: #6b7280;
}

.admin-section .message {
    margin-top: 1rem;
    padding: 1rem;
    border-radius: 0.5rem;
    text-align: center;
    font-weight: 500;
}

.admin-section .message.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.admin-section .message.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Button Styles */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 1rem 2rem;
    border: none;
    border-radius: 0.5rem;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 250ms cubic-bezier(0.4, 0, 0.2, 1);
    min-height: 48px;
}

.btn-primary {
    background: linear-gradient(135deg, #0f766e 0%, #14b8a6 100%);
    color: white;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #14b8a6 0%, #0f766e 100%);
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.btn-danger {
    background: linear-gradient(135deg, #dc2626 0%, #ef4444 100%);
    color: white;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.btn-danger:hover {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.btn-action {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    width: 100%;
    border: none;
}

.btn-delete {
    background-color: #dc2626;
    color: white;
}

.btn-delete:hover {
    background-color: #ef4444;
}

/* TABLE STYLES */
.table-wrapper {
    overflow-x: auto;
    padding: 2rem;
    max-height: 500px;
    overflow-y: auto;
}

.books-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 0.75rem;
    overflow: hidden;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.books-table th {
    background: linear-gradient(135deg, #0f766e 0%, #14b8a6 100%);
    color: white;
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    font-size: 0.875rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    position: sticky;
    top: 0;
    z-index: 10;
}

.books-table td {
    padding: 1rem;
    border-bottom: 1px solid #e5e7eb;
    font-size: 0.95rem;
    vertical-align: middle;
}

.books-table tr:last-child td {
    border-bottom: none;
}

.books-table tr:hover {
    background-color: #f9fafb;
}

/* Status badges */
.status-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.status-available {
    background-color: #d1fae5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.status-issued {
    background-color: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.status-unavailable {
    background-color: #f3f4f6;
    color: #6b7280;
    border: 1px solid #d1d5db;
}

.issued-count {
    font-weight: 600;
    color: #1f2937;
}

/* Action buttons */
.action-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid #e5e7eb;
}

/* Responsive Design */
@media (max-width: 768px) {
    .admin-section {
        padding: 0 1rem;
    }
    
    .admin-section .form-card {
        padding: 2rem;
    }
    
    .table-wrapper {
        padding: 1rem;
    }
    
    .books-table {
        font-size: 0.875rem;
    }
    
    .books-table th,
    .books-table td {
        padding: 0.75rem 0.5rem;
    }
    
    .action-buttons {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
    }
}