/* Custom Styles for Gem Dress Waala */

body {
    background-color: #f8f9fa;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* Header Styles */
header {
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

header h1 {
    font-weight: 600;
    font-size: 1.8rem;
}

/* Navigation Styles */
.navbar {
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.navbar-nav .nav-link {
    font-weight: 500;
    padding: 0.75rem 1rem;
    transition: all 0.3s ease;
}

.navbar-nav .nav-link:hover {
    background-color: rgba(255,255,255,0.1);
    border-radius: 4px;
}

.dropdown-menu {
    border: none;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    border-radius: 8px;
}

.dropdown-item {
    padding: 0.5rem 1rem;
    transition: all 0.2s ease;
}

.dropdown-item:hover {
    background-color: #f8f9fa;
    color: #495057;
}

/* Card Styles */
.card {
    border: none;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}

.card-header {
    background-color: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
    border-radius: 12px 12px 0 0 !important;
    font-weight: 600;
}

/* Dashboard Cards */
.card.bg-primary, .card.bg-success, .card.bg-warning, .card.bg-info {
    border: none;
}

.card.bg-primary .card-body,
.card.bg-success .card-body,
.card.bg-warning .card-body,
.card.bg-info .card-body {
    padding: 1.5rem;
}

.card h2 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.card h4 {
    font-size: 1rem;
    font-weight: 500;
    margin-bottom: 1rem;
}

/* Button Styles - All buttons with proper rounded corners from both ends */
/* UNIVERSAL RULE: All buttons must be rounded - Maximum specificity */
* .btn,
* button.btn,
* a.btn,
* input[type="button"].btn,
* input[type="submit"].btn,
* input[type="reset"].btn,
* button[class*="btn"],
* a[class*="btn"],
* input[class*="btn"],
* .btn,
* .btn-sm,
* .btn-lg,
* .btn-primary,
* .btn-secondary,
* .btn-success,
* .btn-danger,
* .btn-warning,
* .btn-info,
* .btn-light,
* .btn-dark,
* .btn-outline-primary,
* .btn-outline-secondary,
* .btn-outline-success,
* .btn-outline-danger,
* .btn-outline-warning,
* .btn-outline-info,
* .btn-outline-light,
* .btn-outline-dark,
* .btn-link {
    border-radius: 8px !important;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn {
    padding: 0.75rem 1.5rem;
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1.1rem;
    border-radius: 8px !important;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    border-radius: 8px !important;
}

/* Input group buttons - rounded on right side only when attached */
.input-group:not(.btn-group) .btn {
    border-radius: 0 8px 8px 0 !important;
}

.input-group:not(.btn-group) .form-control:first-child {
    border-radius: 8px 0 0 8px !important;
}

.input-group:not(.btn-group) .form-control:last-child {
    border-radius: 0 8px 8px 0 !important;
}

/* Standalone input group buttons (not attached) */
.input-group .btn:not(:first-child):not(:last-child) {
    border-radius: 8px !important;
}

/* Button groups - first and last rounded, middle flat */
.btn-group > .btn:not(:first-child):not(:last-child),
.btn-group-vertical > .btn:not(:first-child):not(:last-child) {
    border-radius: 0 !important;
}

.btn-group > .btn:first-child,
.btn-group-vertical > .btn:first-child {
    border-radius: 8px 0 0 8px !important;
}

.btn-group > .btn:last-child,
.btn-group-vertical > .btn:last-child {
    border-radius: 0 8px 8px 0 !important;
}

.btn-group > .btn:only-child,
.btn-group-vertical > .btn:only-child {
    border-radius: 8px !important;
}

/* Vertical button groups */
.btn-group-vertical > .btn:first-child {
    border-radius: 8px 8px 0 0 !important;
}

.btn-group-vertical > .btn:last-child {
    border-radius: 0 0 8px 8px !important;
}

.btn-group-vertical > .btn:only-child {
    border-radius: 8px !important;
}

/* Ensure all standalone buttons are fully rounded */
.btn:not(.btn-group .btn):not(.input-group .btn) {
    border-radius: 8px !important;
}

/* Final override - ensure all buttons have proper rounded corners */
/* UNIVERSAL: All standalone buttons (not in groups) - Maximum priority */
* .btn:not(.btn-group .btn):not(.btn-group-vertical .btn):not(.input-group .btn),
body .btn:not(.btn-group .btn):not(.btn-group-vertical .btn):not(.input-group .btn),
html body .btn:not(.btn-group .btn):not(.btn-group-vertical .btn):not(.input-group .btn) {
    border-radius: 8px !important;
}

/* Horizontal button groups */
body .btn-group > .btn:first-child:not(:last-child) {
    border-radius: 8px 0 0 8px !important;
}

body .btn-group > .btn:last-child:not(:first-child) {
    border-radius: 0 8px 8px 0 !important;
}

body .btn-group > .btn:only-child {
    border-radius: 8px !important;
}

body .btn-group > .btn:not(:first-child):not(:last-child) {
    border-radius: 0 !important;
}

/* Vertical button groups */
body .btn-group-vertical > .btn:first-child:not(:last-child) {
    border-radius: 8px 8px 0 0 !important;
}

body .btn-group-vertical > .btn:last-child:not(:first-child) {
    border-radius: 0 0 8px 8px !important;
}

body .btn-group-vertical > .btn:only-child {
    border-radius: 8px !important;
}

body .btn-group-vertical > .btn:not(:first-child):not(:last-child) {
    border-radius: 0 !important;
}

/* Input group buttons */
body .input-group > .btn:first-child:not(:last-child) {
    border-radius: 8px 0 0 8px !important;
}

body .input-group > .btn:last-child:not(:first-child) {
    border-radius: 0 8px 8px 0 !important;
}

body .input-group > .btn:only-child {
    border-radius: 8px !important;
}

body .input-group > .btn:not(:first-child):not(:last-child) {
    border-radius: 0 !important;
}

/* Table Styles */
.table {
    border-radius: 8px;
    overflow: hidden;
}

.table thead th {
    background-color: #f8f9fa;
    border-bottom: 2px solid #dee2e6;
    font-weight: 600;
    color: #495057;
}

.table tbody tr:hover {
    background-color: #f8f9fa;
}

/* Form Styles */
.form-control {
    border-radius: 8px;
    border: 2px solid #e9ecef;
    transition: all 0.3s ease;
}

.form-control:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 0.2rem rgba(0,123,255,0.25);
}

/* Search Bar - Keep rounded corners */
.d-flex .form-control {
    border-radius: 8px 0 0 8px;
    border-right: none;
}

.d-flex .btn {
    border-radius: 0 8px 8px 0;
    border-left: none;
}

/* Footer */
footer {
    margin-top: auto;
    box-shadow: 0 -2px 4px rgba(0,0,0,0.1);
}

/* Responsive Design */
@media (max-width: 768px) {
    .card h2 {
        font-size: 2rem;
    }
    
    .btn-lg {
        padding: 0.75rem 1.5rem;
        font-size: 1rem;
    }
    
    .navbar-nav .nav-link {
        padding: 0.5rem 0.75rem;
    }
}

/* Animation Classes */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Status Indicators */
.status-available {
    color: #28a745;
    font-weight: 600;
}

.status-rented {
    color: #ffc107;
    font-weight: 600;
}

.status-damaged {
    color: #dc3545;
    font-weight: 600;
}

/* Loading Spinner */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #007bff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ============================================
   UNIVERSAL BUTTON ROUNDING RULE
   This rule ensures ALL buttons everywhere have rounded corners
   ============================================ */
html body .btn,
html body a.btn,
html body button.btn,
html body input.btn,
html body [class*="btn"]:not(.btn-group):not(.btn-group-vertical):not(.input-group),
html body .btn:not(.btn-group > .btn):not(.btn-group-vertical > .btn):not(.input-group > .btn) {
    border-radius: 8px !important;
}

/* Override for button groups - only apply to buttons inside groups */
html body .btn-group > .btn:first-child:not(:last-child) {
    border-radius: 8px 0 0 8px !important;
}

html body .btn-group > .btn:last-child:not(:first-child) {
    border-radius: 0 8px 8px 0 !important;
}

html body .btn-group > .btn:only-child {
    border-radius: 8px !important;
}

html body .btn-group > .btn:not(:first-child):not(:last-child) {
    border-radius: 0 !important;
}
