/* Professional Enterprise Theme for osTicket (v2) */
:root {
    /* Corporate Palette */
    --primary-color: #0f4c81;
    /* Classic Blue */
    --primary-hover: #0a355c;
    --secondary-color: #6c757d;
    --success-color: #2e7d32;
    --danger-color: #d32f2f;
    --warning-color: #ed6c02;
    --info-color: #0288d1;

    /* Backgrounds */
    --body-bg: #f3f6f9;
    --card-bg: #ffffff;
    --header-bg: #ffffff;
    --footer-bg: #1a202c;

    /* Text */
    --text-main: #212529;
    --text-secondary: #6c757d;
    --text-light: #f8f9fa;

    /* Borders & Shadows */
    --border-color: #dee2e6;
    --box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    --box-shadow-lg: 0 1rem 3rem rgba(0, 0, 0, 0.175);
    --radius-sm: 0.25rem;
    --radius-md: 0.375rem;
}

body {
    font-family: 'Inter', system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: var(--body-bg);
    color: var(--text-main);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* Typography Overrides */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: all 0.2s ease-in-out;
}

a:hover {
    color: var(--primary-hover);
    text-decoration: underline;
}

/* Layout Wrapper Overrides */
#container {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
}

/* Navbar Customization */
.navbar-os {
    background-color: var(--header-bg);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    padding: 0.75rem 0;
}

.navbar-brand img {
    height: 45px;
    width: auto;
}

.nav-link {
    font-weight: 500;
    color: var(--text-main) !important;
    padding: 0.5rem 1rem !important;
    margin: 0 0.25rem;
    border-radius: var(--radius-sm);
}

.nav-link:hover,
.nav-link.active {
    background-color: rgba(15, 76, 129, 0.05);
    color: var(--primary-color) !important;
}

/* Main Content Area */
#content {
    background: var(--card-bg);
    padding: 2.5rem;
    border-radius: var(--radius-md);
    box-shadow: var(--box-shadow);
    margin-top: 2rem;
    margin-bottom: 2rem;
    border: 1px solid var(--border-color);
    min-height: 60vh;

    /* Force centering override */
    margin-left: auto !important;
    margin-right: auto !important;
    float: none !important;
    width: 100% !important;
    /* Allow Bootstrap container class to handle max-width */
}

/* Form Elements */
input[type="text"],
input[type="password"],
input[type="email"],
select,
textarea,
.form-control {
    display: block;
    width: 100%;
    padding: 0.5rem 0.75rem;
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.5;
    color: var(--text-main);
    background-color: #fff;
    background-clip: padding-box;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

input:focus,
select:focus,
textarea:focus {
    border-color: var(--primary-color);
    outline: 0;
    box-shadow: 0 0 0 0.2rem rgba(15, 76, 129, 0.25);
}

/* Buttons */
.btn {
    display: inline-block;
    font-weight: 500;
    line-height: 1.5;
    text-align: center;
    vertical-align: middle;
    cursor: pointer;
    user-select: none;
    padding: 0.5rem 1rem;
    font-size: 1rem;
    border-radius: var(--radius-md);
    border: 1px solid transparent;
    transition: all 0.15s ease-in-out;
}

.btn-primary {
    color: #fff;
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    border-color: var(--primary-hover);
    color: #fff;
    text-decoration: none;
}

/* Footer */
#footer {
    background-color: var(--footer-bg);
    color: var(--text-light);
    padding: 3rem 0;
    font-size: 0.9rem;
}

#footer p {
    margin-bottom: 0.5rem;
    opacity: 0.8;
}

#footer a {
    color: #cbd5e1;
    text-decoration: none;
}

#footer a:hover {
    color: #fff;
}

/* Responsive Table Helper */
.table-responsive-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    width: 100%;
    margin-bottom: 1rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
}

table {
    width: 100% !important;
    max-width: 100%;
    margin-bottom: 0 !important;
}

/* Mobile Tweaks */
@media (max-width: 768px) {
    #content {
        padding: 1.5rem;
        margin-top: 1rem;
        box-shadow: none;
        border: none;
        background: transparent;
    }

    /* Make content look like cards on mobile if possible, otherwise simple */
    #content>form,
    #content>table {
        background: #fff;
        padding: 1rem;
        border-radius: 0.5rem;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    }
}