/**
 * Main Stylesheet
 * Core styles for the subscription platform
 */

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: #d6eaf8;
    color: #2c3e50;
    line-height: 1.6;
    min-height: 100vh;
}

/* Navbar */
.navbar {
    background: #ffffff;
    border-bottom: 2px solid #2e86c1;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 60px;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.navbar-brand {
    padding: 0 20px;
    height: 100%;
    display: flex;
    align-items: center;
    background: #2e86c1;
}

.navbar-brand a {
    color: #ffffff;
    text-decoration: none;
    font-size: 20px;
    font-weight: 600;
}

.navbar-menu {
    display: flex;
    flex: 1;
    height: 100%;
    align-items: center;
    padding: 0 20px;
}

.navbar-menu a {
    color: #2c3e50;
    text-decoration: none;
    padding: 0 15px;
    height: 100%;
    display: flex;
    align-items: center;
    border-bottom: 3px solid transparent;
    transition: all 0.3s;
}

.navbar-menu a:hover {
    background: #eaf2f8;
    border-bottom-color: #2e86c1;
}

.navbar-menu a.active {
    background: #eaf2f8;
    border-bottom-color: #2e86c1;
    color: #2e86c1;
    font-weight: 600;
}

.navbar-user {
    padding: 0 20px;
}

.user-dropdown {
    position: relative;
}

.user-name {
    color: #2c3e50;
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 4px;
    transition: background 0.3s;
    font-weight: 500;
}

.user-name:hover {
    background: #eaf2f8;
}

.dropdown-menu {
    display: none;
    position: absolute;
    right: 0;
    top: 100%;
    background: #ffffff;
    border: 1px solid #aed6f1;
    border-radius: 4px;
    min-width: 200px;
    margin-top: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.user-dropdown:hover .dropdown-menu {
    display: block;
}

.dropdown-menu a {
    display: block;
    padding: 12px 20px;
    color: #2c3e50;
    text-decoration: none;
    transition: background 0.3s;
}

.dropdown-menu a:hover {
    background: #eaf2f8;
    color: #2e86c1;
}

.dropdown-menu hr {
    border: none;
    border-top: 1px solid #d5e8f0;
    margin: 5px 0;
}

/* Main Content */
.main-content {
    padding: 30px;
    max-width: 1400px;
    margin: 0 auto;
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 2px solid #aed6f1;
}

.page-header h1 {
    color: #2e86c1;
    font-size: 28px;
}

.page-header p {
    color: #7f8c8d;
    margin-top: 5px;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 10px 20px;
    background: #2e86c1;
    color: #ffffff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s;
}

.btn:hover {
    background: #2471a3;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(46, 134, 193, 0.3);
}

.btn-primary {
    background: #2e86c1;
    color: #ffffff;
}

.btn-secondary {
    background: #bdc3c7;
    color: #2c3e50;
}

.btn-secondary:hover {
    background: #a9b1b8;
}

.btn-danger {
    background: #e74c3c;
    color: #ffffff;
}

.btn-danger:hover {
    background: #c0392b;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 13px;
}

.btn-block {
    display: block;
    width: 100%;
}

/* Alerts */
.alert {
    padding: 15px 20px;
    border-radius: 4px;
    margin-bottom: 20px;
    border-left: 4px solid;
}

.alert-success {
    background: #eafaf1;
    border-color: #27ae60;
    color: #1e8449;
}

.alert-danger {
    background: #fdedec;
    border-color: #e74c3c;
    color: #c0392b;
}

.alert-warning {
    background: #fef9e7;
    border-color: #f39c12;
    color: #d68910;
}

.alert-info {
    background: #eaf2f8;
    border-color: #2e86c1;
    color: #2471a3;
}

/* Forms */
.form-container {
    background: #ffffff;
    padding: 30px;
    border-radius: 8px;
    margin-bottom: 30px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.07);
}

.standard-form {
    max-width: 900px;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-bottom: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    color: #2e86c1;
    margin-bottom: 8px;
    font-weight: 500;
}

.form-group input,
.form-group select,
.form-group textarea {
    background: #f4f9fc;
    border: 1px solid #aed6f1;
    color: #2c3e50;
    padding: 10px;
    border-radius: 4px;
    font-size: 14px;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #2e86c1;
    box-shadow: 0 0 0 3px rgba(46, 134, 193, 0.15);
}

.form-group input:disabled {
    background: #d6eaf8;
    cursor: not-allowed;
    color: #7f8c8d;
}

.form-group small {
    color: #7f8c8d;
    margin-top: 5px;
    font-size: 12px;
}

.form-actions {
    display: flex;
    gap: 10px;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #d5e8f0;
}

/* Tables */
.table-container {
    background: #ffffff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.07);
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table thead {
    background: #eaf2f8;
}

.data-table th {
    padding: 15px;
    text-align: left;
    color: #2e86c1;
    font-weight: 600;
    border-bottom: 2px solid #aed6f1;
}

.data-table td {
    padding: 12px 15px;
    border-bottom: 1px solid #d5e8f0;
    color: #2c3e50;
}

.data-table tbody tr {
    transition: background 0.3s;
}

.data-table tbody tr:hover {
    background: #eaf2f8;
}

.data-table .no-data {
    text-align: center;
    padding: 40px;
    color: #7f8c8d;
}

.data-table .actions {
    white-space: nowrap;
}

.data-table .actions .btn {
    margin-right: 5px;
}

/* Badges */
.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.badge-success {
    background: #d5f5e3;
    color: #1e8449;
}

.badge-danger {
    background: #fadbd8;
    color: #c0392b;
}

.badge-warning {
    background: #fef5e7;
    color: #d68910;
}

.badge-secondary {
    background: #eaecee;
    color: #7f8c8d;
}

/* Login Page */
.login-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: #d6eaf8;
}

.login-container {
    width: 100%;
    max-width: 400px;
    padding: 20px;
}

.login-box {
    background: #ffffff;
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

.login-header {
    text-align: center;
    margin-bottom: 30px;
}

.login-header h1 {
    color: #2e86c1;
    margin-bottom: 10px;
}

.login-header p {
    color: #7f8c8d;
}

.login-form .form-group {
    margin-bottom: 20px;
}

.login-footer {
    text-align: center;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #d5e8f0;
}

.login-footer a {
    color: #2e86c1;
    text-decoration: none;
}

.login-footer a:hover {
    text-decoration: underline;
}

.register-box {
    max-width: 600px;
}

/* Module Navigation */
.module-nav {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.module-nav a {
    padding: 8px 16px;
    background: #ffffff;
    color: #2c3e50;
    text-decoration: none;
    border-radius: 4px;
    border: 1px solid #aed6f1;
    transition: all 0.3s;
}

.module-nav a:hover {
    background: #eaf2f8;
    border-color: #2e86c1;
}

.module-nav a.active {
    background: #2e86c1;
    color: #ffffff;
    border-color: #2e86c1;
}

/* Responsive */
@media (max-width: 768px) {
    .navbar-menu {
        display: none;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .table-container {
        overflow-x: auto;
    }
}