/* Silent Print Manager - Dashboard Styles */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #f0f2f5;
    color: #333;
    line-height: 1.6;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 20px;
}

/* Header */
.header {
    background: #1a73e8;
    color: white;
    padding: 20px 30px;
    margin-bottom: 30px;
    border-radius: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.header h1 {
    font-size: 22px;
    font-weight: 600;
}
.header .subtitle {
    font-size: 13px;
    opacity: 0.85;
    margin-top: 2px;
}
.header-actions {
    display: flex;
    gap: 10px;
}

/* Cards */
.card {
    background: white;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    margin-bottom: 20px;
    overflow: hidden;
}
.card-header {
    background: #f8f9fa;
    padding: 14px 20px;
    border-bottom: 1px solid #e8eaed;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.card-header h2 {
    font-size: 16px;
    font-weight: 600;
    color: #333;
}
.card-body {
    padding: 20px;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    transition: background 0.2s;
}
.btn-primary {
    background: #1a73e8;
    color: white;
}
.btn-primary:hover {
    background: #1557b0;
}
.btn-success {
    background: #0d904f;
    color: white;
}
.btn-success:hover {
    background: #0a7340;
}
.btn-danger {
    background: #d93025;
    color: white;
}
.btn-danger:hover {
    background: #b3261e;
}
.btn-secondary {
    background: #5f6368;
    color: white;
}
.btn-secondary:hover {
    background: #4a4e51;
}
.btn-outline {
    background: white;
    color: #1a73e8;
    border: 1px solid #dadce0;
}
.btn-outline:hover {
    background: #f0f6ff;
}
.btn-sm {
    padding: 5px 10px;
    font-size: 12px;
}

/* Printer table */
.printer-table {
    width: 100%;
    border-collapse: collapse;
}
.printer-table th,
.printer-table td {
    padding: 10px 14px;
    text-align: left;
    border-bottom: 1px solid #e8eaed;
}
.printer-table th {
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    color: #5f6368;
    background: #f8f9fa;
}
.printer-table tr:hover {
    background: #f8f9fa;
}
.printer-table .actions {
    white-space: nowrap;
}
.printer-table .actions .btn {
    margin-left: 4px;
}

/* Connection badge */
.badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
}
.badge-windows { background: #e8f0fe; color: #1a73e8; }
.badge-network { background: #e6f4ea; color: #0d904f; }
.badge-shared  { background: #fef7e0; color: #e37400; }
.badge-file    { background: #f3e8fd; color: #8430ce; }
.badge-enabled { background: #e6f4ea; color: #0d904f; }
.badge-disabled { background: #fce8e6; color: #d93025; }

/* Form */
.form-group {
    margin-bottom: 14px;
}
.form-group label {
    display: block;
    font-weight: 500;
    margin-bottom: 4px;
    font-size: 13px;
    color: #5f6368;
}
.form-group input,
.form-group select {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #dadce0;
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.2s;
}
.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #1a73e8;
    box-shadow: 0 0 0 2px rgba(26,115,232,0.2);
}
.form-row {
    display: flex;
    gap: 14px;
}
.form-row .form-group {
    flex: 1;
}

/* Modal */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}
.modal-overlay.active {
    display: flex;
}
.modal {
    background: white;
    border-radius: 8px;
    width: 90%;
    max-width: 550px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 8px 30px rgba(0,0,0,0.2);
}
.modal-header {
    padding: 16px 20px;
    border-bottom: 1px solid #e8eaed;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.modal-header h3 {
    font-size: 16px;
}
.modal-close {
    background: none;
    border: none;
    font-size: 22px;
    cursor: pointer;
    color: #5f6368;
    padding: 0 4px;
}
.modal-body {
    padding: 20px;
}
.modal-footer {
    padding: 14px 20px;
    border-top: 1px solid #e8eaed;
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

/* Routing section */
.routing-row {
    display: flex;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #f0f0f0;
}
.routing-row:last-child {
    border-bottom: none;
}
.routing-label {
    width: 100px;
    font-weight: 600;
    font-size: 13px;
    text-transform: uppercase;
    color: #5f6368;
}
.routing-select {
    flex: 1;
}
.routing-select select {
    width: 100%;
    padding: 6px 10px;
    border: 1px solid #dadce0;
    border-radius: 4px;
    font-size: 13px;
}

/* Test print section */
.test-section {
    margin-top: 20px;
}
.test-url {
    display: flex;
    gap: 8px;
}
.test-url input {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid #dadce0;
    border-radius: 4px;
    font-size: 13px;
}
.test-url select {
    width: 120px;
    padding: 8px;
    border: 1px solid #dadce0;
    border-radius: 4px;
    font-size: 13px;
}

/* Toast notifications */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 2000;
}
.toast {
    padding: 12px 20px;
    border-radius: 6px;
    margin-bottom: 8px;
    font-size: 13px;
    color: white;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    animation: slideIn 0.3s ease;
    max-width: 350px;
}
.toast-success { background: #0d904f; }
.toast-error   { background: #d93025; }
.toast-info    { background: #1a73e8; }

@keyframes slideIn {
    from { transform: translateX(100%); opacity: 0; }
    to   { transform: translateX(0); opacity: 1; }
}

/* Empty state */
.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: #5f6368;
}
.empty-state p {
    margin-bottom: 14px;
    font-size: 14px;
}

/* Status indicator */
.status-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 6px;
}
.status-dot.online  { background: #0d904f; }
.status-dot.offline { background: #d93025; }

/* Responsive */
@media (max-width: 768px) {
    .form-row { flex-direction: column; gap: 0; }
    .header { flex-direction: column; gap: 10px; text-align: center; }
    .test-url { flex-direction: column; }
    .printer-table { font-size: 12px; }
    .printer-table th, .printer-table td { padding: 8px; }
}
