/* CS 1.6 Exact Style Recreation */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'MS Sans Serif', 'Tahoma', 'Arial', sans-serif;
    font-size: 11px;
    color: #000000;
    background: #3d4f3d url('../../background.jpg') center center fixed;
    background-size: cover;
    min-height: 100vh;
    line-height: 1.1;
}

/* CS 1.6 Window - Exact Recreation */
.cs16-window {
    background: #c0c0c0;
    border: 2px outset #c0c0c0;
    font-family: 'MS Sans Serif', sans-serif;
    font-size: 11px;
}

.cs16-panel {
    background: #c0c0c0;
    border: 1px inset #c0c0c0;
    padding: 2px;
}

.cs16-button {
    background: #c0c0c0;
    border-top: 1px solid #ffffff;
    border-left: 1px solid #ffffff;
    border-right: 1px solid #808080;
    border-bottom: 1px solid #808080;
    color: #000000;
    padding: 2px 8px;
    font-family: 'MS Sans Serif', 'Tahoma', 'Arial', sans-serif;
    font-size: 11px;
    font-weight: normal;
    cursor: pointer;
    min-height: 21px;
    text-align: center;
    vertical-align: middle;
    line-height: 17px;
}

.cs16-button:hover {
    background: #c0c0c0;
}

.cs16-button:active {
    border-top: 1px solid #808080;
    border-left: 1px solid #808080;
    border-right: 1px solid #ffffff;
    border-bottom: 1px solid #ffffff;
    background: #c0c0c0;
    padding: 3px 7px 1px 9px;
}

.cs16-input {
    background: #ffffff;
    border-top: 1px solid #808080;
    border-left: 1px solid #808080;
    border-right: 1px solid #c0c0c0;
    border-bottom: 1px solid #c0c0c0;
    color: #000000;
    padding: 2px 3px;
    font-family: 'MS Sans Serif', 'Tahoma', 'Arial', sans-serif;
    font-size: 11px;
    font-weight: normal;
    height: 20px;
    line-height: 16px;
}

.cs16-input:focus {
    outline: none;
    background: #ffffff;
}

/* Auth Pages - CS 1.6 Dialog Style */
.auth-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.auth-form {
    width: 100%;
    max-width: 350px;
    background: #c0c0c0;
    border: 2px outset #c0c0c0;
    font-family: 'MS Sans Serif', sans-serif;
    box-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.auth-header {
    background: linear-gradient(90deg, #0a246a 0%, #a6caf0 100%);
    padding: 3px 6px;
    color: #ffffff;
    font-weight: bold;
    font-size: 11px;
    position: relative;
    height: 18px;
    display: flex;
    align-items: center;
}

.auth-header h1 {
    font-size: 11px;
    font-weight: bold;
    margin: 0;
    flex: 1;
}

.auth-header p {
    display: none;
}

.auth-header::after {
    content: "r";
    position: absolute;
    right: 4px;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 14px;
    background: #c0c0c0;
    border: 1px outset #c0c0c0;
    color: #000000;
    font-size: 10px;
    font-family: 'Marlett', monospace;
    text-align: center;
    line-height: 12px;
    cursor: pointer;
    user-select: none;
}

.auth-header::after:hover {
    background: #d4d0c8;
}

.auth-header::after:active {
    border: 1px inset #c0c0c0;
    background: #c0c0c0;
}

.auth-body {
    background: #c0c0c0;
    padding: 8px;
    border-top: 1px solid #808080;
}

.auth-footer {
    text-align: center;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px inset #c0c0c0;
    font-size: 11px;
}

.auth-footer a {
    color: #000080;
    text-decoration: none;
}

.auth-footer a:hover {
    text-decoration: underline;
}

/* Form Elements - CS 1.6 Style */
.form-group {
    margin-bottom: 8px;
}

.form-group label {
    display: block;
    margin-bottom: 2px;
    color: #000000;
    font-size: 11px;
    font-weight: normal;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    background: #ffffff;
    border-top: 1px solid #808080;
    border-left: 1px solid #808080;
    border-right: 1px solid #c0c0c0;
    border-bottom: 1px solid #c0c0c0;
    color: #000000;
    padding: 2px 3px;
    font-family: 'MS Sans Serif', 'Tahoma', 'Arial', sans-serif;
    font-size: 11px;
    font-weight: normal;
    height: 20px;
    line-height: 16px;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    background: #ffffff;
}

.form-group textarea {
    height: 60px;
    resize: none;
    line-height: 16px;
}

/* Buttons - Exact CS 1.6 */
.btn {
    background: #c0c0c0;
    border-top: 1px solid #ffffff;
    border-left: 1px solid #ffffff;
    border-right: 1px solid #808080;
    border-bottom: 1px solid #808080;
    color: #000000;
    padding: 2px 8px;
    font-family: 'MS Sans Serif', 'Tahoma', 'Arial', sans-serif;
    font-size: 11px;
    font-weight: normal;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    text-align: center;
    min-height: 21px;
    line-height: 17px;
    vertical-align: middle;
}

.btn:hover {
    background: #c0c0c0;
    text-decoration: none;
    color: #000000;
}

.btn:active {
    border-top: 1px solid #808080;
    border-left: 1px solid #808080;
    border-right: 1px solid #ffffff;
    border-bottom: 1px solid #ffffff;
    background: #c0c0c0;
    padding: 3px 7px 1px 9px;
    color: #000000;
}

.btn-primary {
    width: 100%;
    margin-top: 6px;
}

.btn-success {
    background: #c0c0c0;
    border-top: 1px solid #ffffff;
    border-left: 1px solid #ffffff;
    border-right: 1px solid #808080;
    border-bottom: 1px solid #808080;
}

.btn-danger {
    background: #c0c0c0;
    border-top: 1px solid #ffffff;
    border-left: 1px solid #ffffff;
    border-right: 1px solid #808080;
    border-bottom: 1px solid #808080;
}

.btn-warning {
    background: #c0c0c0;
    border-top: 1px solid #ffffff;
    border-left: 1px solid #ffffff;
    border-right: 1px solid #808080;
    border-bottom: 1px solid #808080;
}

.btn-sm {
    padding: 1px 6px;
    font-size: 10px;
    min-height: 18px;
    line-height: 16px;
}

/* Alerts - CS 1.6 Message Box Style */
.alert {
    background: #c0c0c0;
    border: 2px outset #c0c0c0;
    color: #000000;
    padding: 6px;
    margin-bottom: 8px;
    font-size: 11px;
}

.alert-error {
    background: #c0c0c0;
    border: 2px outset #c0c0c0;
    color: #000000;
}

.alert-success {
    background: #c0c0c0;
    border: 2px outset #c0c0c0;
    color: #000000;
}

.alert-info {
    background: #c0c0c0;
    border: 2px outset #c0c0c0;
    color: #000000;
}

.alert-warning {
    background: #c0c0c0;
    border: 2px outset #c0c0c0;
    color: #000000;
}

/* Dashboard Layout - CS 1.6 Application Style */
.dashboard-container {
    min-height: 100vh;
    background: transparent;
}

.navbar {
    background: #c0c0c0;
    border-bottom: 1px solid #808080;
    padding: 2px 6px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 24px;
    font-size: 11px;
}

.navbar-brand {
    font-size: 11px;
    font-weight: bold;
    color: #000000;
    text-decoration: none;
}

.navbar-nav {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 11px;
}

.navbar-nav span {
    color: #000000;
}

.navbar-nav a {
    color: #000080;
    text-decoration: none;
    font-size: 11px;
}

.navbar-nav a:hover {
    text-decoration: underline;
}

.main-content {
    padding: 8px;
    background: #c0c0c0;
    min-height: calc(100vh - 24px);
}

/* Tabs - CS 1.6 Tab Control */
.tabs-container {
    background: #c0c0c0;
    border: 1px solid #808080;
}

.tabs-nav {
    display: flex;
    background: #c0c0c0;
    border-bottom: 1px solid #808080;
    padding: 0;
    margin: 0;
}

.tab-btn {
    background: #c0c0c0;
    border-top: 1px solid #ffffff;
    border-left: 1px solid #ffffff;
    border-right: 1px solid #808080;
    border-bottom: 1px solid #808080;
    color: #000000;
    padding: 2px 8px;
    font-size: 11px;
    font-weight: normal;
    cursor: pointer;
    margin-right: 0;
    font-family: 'MS Sans Serif', 'Tahoma', 'Arial', sans-serif;
    height: 21px;
    line-height: 17px;
}

.tab-btn:hover {
    background: #c0c0c0;
}

.tab-btn.active {
    background: #c0c0c0;
    border-top: 1px solid #ffffff;
    border-left: 1px solid #ffffff;
    border-right: 1px solid #808080;
    border-bottom: 1px solid #c0c0c0;
    position: relative;
    top: 1px;
    height: 22px;
}

.tab-content {
    background: #c0c0c0;
    padding: 8px;
    min-height: 400px;
    display: none;
    border-top: none;
}

.tab-content.active {
    display: block;
}

.tab-content h2 {
    color: #000000;
    font-size: 12px;
    margin-bottom: 8px;
    font-weight: bold;
}

/* Cards - CS 1.6 Group Box Style */
.card {
    background: #c0c0c0;
    border: 2px inset #c0c0c0;
    margin-bottom: 8px;
}

.card-header {
    padding: 2px 6px;
    background: #c0c0c0;
    border-bottom: 1px solid #808080;
    font-size: 11px;
    color: #000000;
    font-weight: bold;
}

.card-body {
    padding: 6px;
    background: #c0c0c0;
}

.card-footer {
    padding: 2px 6px;
    background: #c0c0c0;
    border-top: 1px solid #808080;
    font-size: 11px;
}

/* Tables - CS 1.6 List View */
.table-responsive {
    overflow-x: auto;
}

.table {
    width: 100%;
    border-collapse: collapse;
    background: #ffffff;
    border: 2px inset #c0c0c0;
    font-size: 11px;
}

.table th,
.table td {
    padding: 1px 4px;
    text-align: left;
    border-right: 1px solid #c0c0c0;
    height: 16px;
    line-height: 14px;
}

.table th {
    background: #c0c0c0;
    color: #000000;
    font-weight: bold;
    border-bottom: 1px solid #808080;
}

.table td {
    background: #ffffff;
    color: #000000;
}

.table tbody tr:hover td {
    background: #316ac5;
    color: #ffffff;
}

/* Status Badges - CS 1.6 Style */
.status-badge {
    display: inline-block;
    padding: 0px 2px;
    font-size: 11px;
    border: 1px solid #808080;
    background: #ffffff;
    color: #000000;
}

.status-active {
    background: #ffffff;
    color: #008000;
}

.status-expired {
    background: #ffffff;
    color: #800000;
}

.status-pending {
    background: #ffffff;
    color: #808000;
}

.status-admin {
    background: #ffffff;
    color: #000080;
    font-weight: bold;
}

.status-user {
    background: #ffffff;
    color: #404040;
}

/* Search */
.search-container {
    margin-bottom: 8px;
}

.search-group {
    display: flex;
    gap: 4px;
    align-items: center;
    flex-wrap: wrap;
}

.search-group input {
    flex: 1;
    min-width: 150px;
}

.search-group select {
    min-width: 100px;
}

/* Statistics Cards - CS 1.6 Group Box */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 8px;
    margin-bottom: 8px;
}

.stat-card {
    background: #c0c0c0;
    border: 2px inset #c0c0c0;
    padding: 6px;
    text-align: center;
}

.stat-value {
    font-size: 18px;
    color: #000000;
    margin-bottom: 2px;
    font-weight: bold;
}

.stat-label {
    font-size: 11px;
    color: #000000;
}

/* Loading spinner */
.loading {
    display: inline-block;
    width: 12px;
    height: 12px;
    border: 2px solid #c0c0c0;
    border-radius: 50%;
    border-top-color: #000000;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Code blocks */
code {
    background: #ffffff;
    color: #000000;
    padding: 1px 2px;
    font-family: 'Courier New', monospace;
    font-size: 10px;
    border: 1px inset #c0c0c0;
}

/* Installer specific styles */
.install-step-indicator {
    width: 30px;
    height: 20px;
    background: #c0c0c0;
    border: 2px inset #c0c0c0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: bold;
    color: #000000;
}

.install-step-indicator.active {
    border: 2px outset #c0c0c0;
}

.install-step-indicator.completed {
    border: 2px inset #c0c0c0;
    background: #ffffff;
}

/* Group boxes - Windows 98 style */
.group-box {
    background: #c0c0c0;
    border: 2px inset #c0c0c0;
    margin: 8px 0;
    padding: 8px;
}

.group-box-header {
    background: #c0c0c0;
    padding: 2px 6px;
    margin: -8px -8px 8px -8px;
    border-bottom: 1px solid #808080;
    font-weight: bold;
    font-size: 11px;
}

/* Progress bars - Windows 98 style */
.progress-bar {
    width: 100%;
    height: 20px;
    background: #ffffff;
    border: 2px inset #c0c0c0;
    margin: 4px 0;
}

.progress-bar-fill {
    height: 16px;
    background: #316ac5;
    margin: 2px;
}

/* List boxes - Windows 98 style */
.list-box {
    background: #ffffff;
    border: 2px inset #c0c0c0;
    height: 100px;
    overflow-y: auto;
    font-size: 11px;
    padding: 2px;
}

/* Checkboxes and radio buttons - Windows 98 style */
input[type="checkbox"],
input[type="radio"] {
    width: 13px;
    height: 13px;
    margin-right: 4px;
    vertical-align: middle;
}

/* Labels for form elements */
label {
    font-family: 'MS Sans Serif', 'Tahoma', 'Arial', sans-serif;
    font-size: 11px;
    color: #000000;
    cursor: pointer;
}

/* Windows 98 style moveable/resizable window */
.window-container {
    position: absolute;
    background: #c0c0c0;
    border: 2px outset #c0c0c0;
    box-shadow: 2px 2px 4px rgba(0,0,0,0.5);
    min-width: 320px;
    min-height: 240px;
    z-index: 1000;
}

.window-container.maximized {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    border: none !important;
    box-shadow: none !important;
}

.window-titlebar {
    background: linear-gradient(90deg, #0a246a 0%, #a6caf0 100%);
    color: #ffffff;
    padding: 2px 4px;
    cursor: move;
    user-select: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 18px;
    font-size: 11px;
    font-weight: bold;
}

.window-titlebar.inactive {
    background: linear-gradient(90deg, #808080 0%, #c0c0c0 100%);
    color: #c0c0c0;
}

.window-title {
    flex: 1;
    padding-left: 2px;
}

.window-controls {
    display: flex;
    gap: 2px;
}

.window-control-btn {
    width: 16px;
    height: 14px;
    background: #c0c0c0;
    border: 1px outset #c0c0c0;
    color: #000000;
    font-size: 10px;
    font-family: 'Marlett', monospace;
    text-align: center;
    line-height: 12px;
    cursor: pointer;
    user-select: none;
}

.window-control-btn:hover {
    background: #d4d0c8;
}

.window-control-btn:active {
    border: 1px inset #c0c0c0;
    background: #c0c0c0;
}

.window-content {
    background: #c0c0c0;
    width: 100%;
    height: calc(100% - 18px);
    overflow: hidden;
}

.window-resize-handle {
    position: absolute;
    background: transparent;
}

.window-resize-handle.nw-resize {
    top: 0;
    left: 0;
    width: 8px;
    height: 8px;
    cursor: nw-resize;
}

.window-resize-handle.n-resize {
    top: 0;
    left: 8px;
    right: 8px;
    height: 3px;
    cursor: n-resize;
}

.window-resize-handle.ne-resize {
    top: 0;
    right: 0;
    width: 8px;
    height: 8px;
    cursor: ne-resize;
}

.window-resize-handle.w-resize {
    top: 8px;
    bottom: 8px;
    left: 0;
    width: 3px;
    cursor: w-resize;
}

.window-resize-handle.e-resize {
    top: 8px;
    bottom: 8px;
    right: 0;
    width: 3px;
    cursor: e-resize;
}

.window-resize-handle.sw-resize {
    bottom: 0;
    left: 0;
    width: 8px;
    height: 8px;
    cursor: sw-resize;
}

.window-resize-handle.s-resize {
    bottom: 0;
    left: 8px;
    right: 8px;
    height: 3px;
    cursor: s-resize;
}

.window-resize-handle.se-resize {
    bottom: 0;
    right: 0;
    width: 8px;
    height: 8px;
    cursor: se-resize;
}

.desktop {
    position: relative;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
    background: url('../../background.jpg') center center no-repeat;
    background-size: cover;
    background-attachment: fixed;
}

.taskbar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 28px;
    background: #c0c0c0;
    border-top: 1px solid #dfdfdf;
    border-bottom: 1px solid #808080;
    display: flex;
    align-items: center;
    padding: 2px;
    z-index: 9999;
}

.start-button {
    background: #c0c0c0;
    border: 1px outset #c0c0c0;
    padding: 2px 8px;
    font-size: 11px;
    font-weight: bold;
    cursor: pointer;
    margin-right: 4px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.start-button:active {
    border: 1px inset #c0c0c0;
}

.taskbar-items {
    display: flex;
    gap: 2px;
    margin-left: 4px;
    flex: 1;
}

.taskbar-item {
    background: #c0c0c0;
    border: 1px outset #c0c0c0;
    padding: 2px 8px;
    font-size: 11px;
    cursor: pointer;
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 4px;
}

.taskbar-item:hover {
    background: #d4d0c8;
}

.taskbar-item:active,
.taskbar-item.active {
    border: 1px inset #c0c0c0;
    background: #c0c0c0;
}

.taskbar-item.minimized {
    font-style: italic;
    opacity: 0.8;
}

.taskbar-clock {
    margin-left: auto;
    font-size: 11px;
    padding: 2px 8px;
    border: 1px inset #c0c0c0;
}

.window-minimized {
    display: none !important;
}

/* Windows 98 Start Menu */
.start-menu {
    position: fixed;
    bottom: 28px;
    left: 2px;
    width: 200px;
    background: #c0c0c0;
    border: 2px outset #c0c0c0;
    box-shadow: 2px 2px 4px rgba(0,0,0,0.5);
    z-index: 10000;
    display: none;
    font-family: 'MS Sans Serif', 'Tahoma', 'Arial', sans-serif;
    font-size: 11px;
}

.start-menu-header {
    background: linear-gradient(90deg, #0a246a 0%, #a6caf0 100%);
    color: #ffffff;
    padding: 4px 8px;
    font-weight: bold;
    font-size: 11px;
    border-bottom: 1px solid #808080;
}

.start-menu-items {
    padding: 2px 0;
}

.start-menu-item {
    display: flex;
    align-items: center;
    padding: 3px 8px;
    cursor: pointer;
    color: #000000;
    text-decoration: none;
    gap: 6px;
    font-size: 11px;
    border: none;
    background: transparent;
    width: 100%;
    text-align: left;
}

.start-menu-item:hover {
    background: #316ac5;
    color: #ffffff;
}

.start-menu-item .icon {
    width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
}

.start-menu-separator {
    height: 1px;
    background: #808080;
    margin: 2px 8px;
    border-top: 1px solid #ffffff;
}

.start-button.active {
    border: 1px inset #c0c0c0;
    background: #c0c0c0;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .main-content {
        padding: 4px;
    }
    
    .tabs-nav {
        flex-wrap: wrap;
    }
    
    .search-group {
        flex-direction: column;
    }
    
    .search-group input,
    .search-group select {
        min-width: 100%;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
}