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

:root {
    --primary: #008080;
    --primary-dark: #005555;
    --primary-light: #00AAAA;

    --success: #28a745;
    --success-dark: #1e7e34;
    --success-light: #71dd8a;

    --info: #17a2b8;
    --info-dark: #117a8b;
    --info-light: #6edff6;

    --warning: #ffc107;
    --warning-dark: #d39e00;
    --warning-light: #ffeaa7;

    --text-dark: #2d3748;
    --text-muted: #718096;

    --bg-light: #f7fafc;
    --border: #e2e8f0;
}

/* ==========================
   Base Styles
========================== */
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
    background-color: var(--bg-light);
    color: var(--text-dark);
    margin: 0;
    padding: 0;
    line-height: 1.6;
    font-weight: 400;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    text-decoration: none;
}

.text-primary-dark { color: var(--primary-dark) !important; }
.text-primary-light { color: var(--primary-light) !important; }
.text-success-light { color: var(--success-light) !important; }
.text-info-light { color: var(--info-light) !important; }
.text-warning-light { color: var(--warning-light) !important; }
.text-gray-300 { color: #dddfeb !important; }
.text-gray-500 { color: #b7b9cc !important; }
.text-gray-600 { color: #858796 !important; }
.text-gray-800 { color: #5a5c69 !important; }

/* ==========================
   Layout Wrapper
========================== */
#wrapper {
    display: flex;
    min-height: 100vh;
    width: 100%;
}

/* ==========================
   Sidebar
========================== */
.sidebar {
    width: 250px;
    min-height: 100vh;
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
    transition: all 0.3s ease;
    padding-top: 1rem;
    flex-shrink: 0;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
}

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

.sidebar-brand-link {
    display: inline-block;
}

.sidebar-brand-text {
    color: #fff;
    font-size: 1.5rem;
    font-weight: 700;
}

.sidebar .nav-item .nav-link {
    color: rgba(255, 255, 255, 0.7);
    padding: 0.75rem 1.25rem;
    display: flex;
    align-items: center;
    border-radius: 0.35rem;
    margin: 0.25rem 0.75rem;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.sidebar .nav-item .nav-link:hover,
.sidebar .nav-item .nav-link.active {
    background-color: var(--primary);
    color: #fff;
    font-weight: 600;
}

.sidebar .nav-item .nav-link i {
    font-size: 1.2rem;
    margin-right: 0.75rem;
}

/* ==========================
   Page Content
========================== */
#page-content-wrapper {
    flex-grow: 1;
    width: 100%;
    padding: 1.5rem;
    transition: all 0.3s ease;
    background-color: var(--bg-light);
}

/* ==========================
   Topbar
========================== */
.topbar {
    border-bottom: 1px solid var(--border);
    background-color: #fff;
    padding: 0.75rem 1rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

/* ==========================
   Card
========================== */
.card {
    border-radius: 0.75rem;
    border: 1px solid var(--border);
    overflow: hidden;
    background-color: #fff;
    transition: all 0.3s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.card-hover:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.card-body {
    padding: 1.5rem;
    font-weight: 400;
}

.border-left-primary { border-left: 0.35rem solid var(--primary) !important; }
.border-left-success { border-left: 0.35rem solid var(--success) !important; }
.border-left-info { border-left: 0.35rem solid var(--info) !important; }
.border-left-warning { border-left: 0.35rem solid var(--warning) !important; }

/* ==========================
   Buttons
========================== */
.btn {
    border-radius: 0.5rem;
    font-weight: 500;
    transition: all 0.2s ease;
    border: none;
    position: relative;
    overflow: hidden;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: #fff;
}
.btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
}

.btn-success {
    background: linear-gradient(135deg, var(--success) 0%, var(--success-light) 100%);
    color: #fff;
}
.btn-success:hover {
    background: linear-gradient(135deg, var(--success-dark) 0%, var(--success) 100%);
}

.btn-info {
    background: linear-gradient(135deg, var(--info) 0%, var(--info-light) 100%);
    color: #fff;
}
.btn-info:hover {
    background: linear-gradient(135deg, var(--info-dark) 0%, var(--info) 100%);
}

.btn-warning {
    background: linear-gradient(135deg, var(--warning) 0%, var(--warning-light) 100%);
    color: #212529;
}
.btn-warning:hover {
    background: linear-gradient(135deg, var(--warning-dark) 0%, var(--warning) 100%);
}

/* ==========================
   Forms
========================== */
.form-control {
    border-radius: 0.5rem;
    border: 1px solid var(--border);
    padding: 0.5rem 0.75rem;
    transition: all 0.2s ease;
    height: auto;
    line-height: 1.5;
}

.form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 0.2rem rgba(0, 128, 128, 0.25);
    outline: none;
}

/* Specific styling for select elements to ensure full text display */
select.form-control {
    padding: 0.5rem 0.75rem;
    min-width: 250px;
    height: 2.5rem;
    line-height: 1.5;
    background-position: right 0.75rem center;
    background-size: 1rem;
    box-sizing: border-box;
}

/* Form group styling for better alignment */
.form-group {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
}

.form-group label {
    margin-bottom: 0;
    margin-right: 0.5rem;
    white-space: nowrap;
}

/* ==========================
   Alerts
========================== */
.alert {
    border-radius: 0.5rem;
    font-size: 0.9rem;
    font-weight: 500;
    padding: 0.75rem 1rem;
    border: none;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.alert-info {
    background-color: var(--info-light);
    color: var(--text-dark);
    border-left: 5px solid var(--info);
}

.alert-success {
    background-color: var(--success-light);
    color: var(--text-dark);
    border-left: 5px solid var(--success);
}

.alert-warning {
    background-color: var(--warning-light);
    color: var(--text-dark);
    border-left: 5px solid var(--warning);
}

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

/* ==========================
   Activity Feed
========================== */
.activity-feed {
    list-style: none;
    padding-left: 0;
    margin: 0;
}

.activity-feed .feed-item {
    position: relative;
    padding-left: 25px;
    margin-bottom: 1rem;
}

.activity-feed .feed-item:before {
    content: '';
    position: absolute;
    left: 0;
    top: 5px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--primary);
    border: 2px solid var(--primary-light);
}

.activity-feed .feed-item .date {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.activity-feed .feed-item .text {
    font-weight: 500;
    line-height: 1.5;
}

/* ==========================
   Footer
========================== */
.footer {
    padding: 1.5rem;
    background-color: #fff;
    border-top: 1px solid var(--border);
    text-align: center;
    font-size: 0.9rem;
    color: var(--text-muted);
    font-weight: 500;
    box-shadow: 0 -2px 4px rgba(0, 0, 0, 0.05);
}

/* ==========================
   Responsive
========================== */
@media (max-width: 991.98px) {
    .sidebar {
        width: 220px;
    }
}

@media (max-width: 767.98px) {
    #wrapper {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        min-height: auto;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    #page-content-wrapper {
        padding: 1rem;
    }
    
    .form-group {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .form-group label {
        margin-bottom: 0.5rem;
    }
}